[PATCH] osmo-pcu[master]: jenkins.sh: more quotes, cosmetics, less dup

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Wed Aug 10 14:05:42 UTC 2016


Review at  https://gerrit.osmocom.org/681

jenkins.sh: more quotes, cosmetics, less dup

Rename BTS_CONFIG to PCU_CONFIG.
More quotes.
Unify bash if-style.
Define *_PATH variables once globally instead of duping in every line.

Change-Id: If148632c3f340a8a395fa432135e593fecc41e82
---
M contrib/jenkins.sh
1 file changed, 16 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/81/681/1

diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index b4b0cb7..e108e36 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -7,9 +7,9 @@
   exit 1
 fi
 
-if [ $sysmobts = "no" -a $sysmodsp = "yes" ]; then
-   echo "This config does not make sense."
-   exit 0
+if [ "$sysmobts" = "no" -a "$sysmodsp" = "yes" ]; then
+  echo "This config does not make sense."
+  exit 0
 fi
 
 base="$PWD"
@@ -17,22 +17,19 @@
 inst="$deps/install"
 
 rm -rf "$inst"
-mkdir "$deps" || true
+mkdir -p "$deps"
+
 cd "$deps"
 osmo-deps.sh libosmocore
-
 cd libosmocore
 autoreconf --install --force
 ./configure --prefix="$inst"
 $MAKE $PARALLEL_MAKE install
 
-# Install the API
 cd "$deps"
-if ! test -d layer1-api;
-then
+if [ ! -d layer1-api ]; then
   git clone git://git.sysmocom.de/sysmo-bts/layer1-api.git layer1-api
 fi
-
 cd layer1-api
 git fetch origin
 git reset --hard origin/master
@@ -40,13 +37,15 @@
 mkdir -p "$api_incl"
 cp include/*.h "$api_incl"
 
-cd "$base"
-autoreconf --install --force
-BTS_CONFIG="--enable-sysmocom-bts=$sysmobts --enable-sysmocom-dsp=$sysmodsp"
-if [ $sysmobts = "no" ]; then
-  BTS_CONFIG="$BTS_CONFIG --enable-vty-tests"
+PCU_CONFIG="--enable-sysmocom-bts=$sysmobts --enable-sysmocom-dsp=$sysmodsp"
+if [ "$sysmobts" = "no" ]; then
+  PCU_CONFIG="$PCU_CONFIG --enable-vty-tests"
 fi
 
-PKG_CONFIG_PATH="$inst/lib/pkgconfig" ./configure $BTS_CONFIG
-PKG_CONFIG_PATH="$inst/lib/pkgconfig" $MAKE $PARALLEL_MAKE
-DISTCHECK_CONFIGURE_FLAGS="$BTS_CONFIG" AM_DISTCHECK_CONFIGURE_FLAGS="$BTS_CONFIG" PKG_CONFIG_PATH="$inst/lib/pkgconfig" LD_LIBRARY_PATH="$inst/lib" $MAKE distcheck
+export PKG_CONFIG_PATH="$inst/lib/pkgconfig"
+export LD_LIBRARY_PATH="$inst/lib"
+cd "$base"
+autoreconf --install --force
+./configure $PCU_CONFIG
+$MAKE $PARALLEL_MAKE
+DISTCHECK_CONFIGURE_FLAGS="$PCU_CONFIG" AM_DISTCHECK_CONFIGURE_FLAGS="$PCU_CONFIG" $MAKE distcheck

-- 
To view, visit https://gerrit.osmocom.org/681
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If148632c3f340a8a395fa432135e593fecc41e82
Gerrit-PatchSet: 1
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: neels_test_account <neels at hofmeyr.de>



More information about the gerrit-log mailing list