diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-10-06 22:47:52 +0200 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-10-06 22:47:52 +0200 |
commit | 315e5929f51727a787f56c85e4498f8fd17817df (patch) | |
tree | bd394cc2762003433f9c1b96f685f52ab43bbd81 /scripts/osmo-build-dep.sh | |
parent | f215b29441cc2ff09f0adc73876a3a9af3f8a9cd (diff) |
add osmo-build-dep.sh from openbsc/contrib/jenkins.sh
Change-Id: I73669753a0f5030575d21e90378a1285cfe898de
Diffstat (limited to 'scripts/osmo-build-dep.sh')
-rwxr-xr-x | scripts/osmo-build-dep.sh | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/scripts/osmo-build-dep.sh b/scripts/osmo-build-dep.sh new file mode 100755 index 0000000..001df85 --- /dev/null +++ b/scripts/osmo-build-dep.sh @@ -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 |