add osmo-build-dep.sh from openbsc/contrib/jenkins.sh

Change-Id: I73669753a0f5030575d21e90378a1285cfe898de
This commit is contained in:
Neels Hofmeyr 2016-10-06 22:47:52 +02:00
parent f215b29441
commit 315e5929f5
1 changed files with 45 additions and 0 deletions

45
scripts/osmo-build-dep.sh Executable file
View File

@ -0,0 +1,45 @@
#!/bin/sh
project="$1"
branch="$2"
cfg="$3"
set -e
set +x
echo
echo
echo
echo " =============================== $project ==============================="
echo
if [ -z "$project" ]; then
echo "internal failure: \$project is empty"
exit 1
fi
if [ -z "$deps" ]; then
echo "internal failure: \$deps is empty"
exit 1
fi
if [ -z "$inst" ]; then
echo "internal failure: \$inst is empty"
exit 1
fi
if [ -z "$MAKE" ]; then
echo "internal failure: \$MAKE is empty"
exit 1
fi
set -x
mkdir -p "$deps"
cd "$deps"
rm -rf "$project"
osmo-deps.sh "$project"
cd "$project"
if [ -n "$branch" ]; then
git checkout "$branch"
fi
git rev-parse HEAD # log current HEAD
autoreconf --install --force
./configure --prefix="$inst" $cfg
$MAKE $PARALLEL_MAKE install