jenkins.sh: use absolute paths instead of 'cd ..' and $PWD

Change-Id: If79d283fa0a559bb7ea319c513d09466eff523d1
This commit is contained in:
Neels Hofmeyr 2016-08-10 14:42:16 +02:00 committed by Neels Hofmeyr
parent 0b4da058ad
commit 6bae2d11f1
1 changed files with 16 additions and 11 deletions

View File

@ -12,18 +12,22 @@ if [ $sysmobts = "no" -a $sysmodsp = "yes" ]; then
exit 0 exit 0
fi fi
rm -rf deps/install base="$PWD"
mkdir deps || true deps="$base/deps"
cd deps inst="$deps/install"
rm -rf "$inst"
mkdir "$deps" || true
cd "$deps"
osmo-deps.sh libosmocore osmo-deps.sh libosmocore
cd libosmocore cd libosmocore
autoreconf --install --force autoreconf --install --force
./configure --prefix=$PWD/../install ./configure --prefix="$inst"
$MAKE $PARALLEL_MAKE install $MAKE $PARALLEL_MAKE install
# Install the API # Install the API
cd ../ cd "$deps"
if ! test -d layer1-api; if ! test -d layer1-api;
then then
git clone git://git.sysmocom.de/sysmo-bts/layer1-api.git layer1-api git clone git://git.sysmocom.de/sysmo-bts/layer1-api.git layer1-api
@ -32,16 +36,17 @@ fi
cd layer1-api cd layer1-api
git fetch origin git fetch origin
git reset --hard origin/master git reset --hard origin/master
mkdir -p $PWD/../install/include/sysmocom/femtobts/ api_incl="$inst/include/sysmocom/femtobts/"
cp include/*.h ../install/include/sysmocom/femtobts/ mkdir -p "$api_incl"
cp include/*.h "$api_incl"
cd ../../ cd "$base"
autoreconf --install --force autoreconf --install --force
BTS_CONFIG="--enable-sysmocom-bts=$sysmobts --enable-sysmocom-dsp=$sysmodsp" BTS_CONFIG="--enable-sysmocom-bts=$sysmobts --enable-sysmocom-dsp=$sysmodsp"
if [ $sysmobts = "no" ]; then if [ $sysmobts = "no" ]; then
BTS_CONFIG="$BTS_CONFIG --enable-vty-tests" BTS_CONFIG="$BTS_CONFIG --enable-vty-tests"
fi fi
PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig ./configure $BTS_CONFIG PKG_CONFIG_PATH="$inst/lib/pkgconfig" ./configure $BTS_CONFIG
PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig $MAKE $PARALLEL_MAKE PKG_CONFIG_PATH="$inst/lib/pkgconfig" $MAKE $PARALLEL_MAKE
DISTCHECK_CONFIGURE_FLAGS="$BTS_CONFIG" AM_DISTCHECK_CONFIGURE_FLAGS="$BTS_CONFIG" PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig LD_LIBRARY_PATH=$PWD/deps/install/lib $MAKE distcheck DISTCHECK_CONFIGURE_FLAGS="$BTS_CONFIG" AM_DISTCHECK_CONFIGURE_FLAGS="$BTS_CONFIG" PKG_CONFIG_PATH="$inst/lib/pkgconfig" LD_LIBRARY_PATH="$inst/lib" $MAKE distcheck