summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2017-11-15 20:42:39 +0100
committerAlexander Couzens <lynxis@fe80.eu>2017-11-21 14:36:38 +0100
commit3eb2c50d28c62db33db7ee50762b08aaab1b309d (patch)
tree4596c4de35df95ba420b9bc9a0ea6f709e6c7c04 /scripts
parentd43eda7abbf5793baf2dc0d7abf6208bb06cb187 (diff)
osmocom-latest-packages: introduce $TOP dir variable
Using a $TOP variable makes directory paths more clear to understandable. Path now expressed starting from the TOP dir instead of using ../../../foo Change-Id: I7a87532a3232fbcfb5f676588991dbc59a34f739
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/osmocom-latest-packages.sh14
1 files changed, 8 insertions, 6 deletions
diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh
index ff1bc34..9deae23 100755
--- a/scripts/osmocom-latest-packages.sh
+++ b/scripts/osmocom-latest-packages.sh
@@ -6,6 +6,7 @@ set -e
PROJ=network:osmocom:latest
DT=`date +%Y%m%d`
+TOP=$(pwd)
# start with a checkout of the project
if [ -d $PROJ ]; then
@@ -17,19 +18,20 @@ fi
build() {
echo
echo "====> Building $1"
+ cd $TOP
rm -rf data
[ -d $1 ] || git clone git://git.osmocom.org/$1
cd $1
git fetch
VER=`git describe --abbrev=0 --tags --match "*.*.*" origin/master`
git checkout -f -B $VER refs/tags/$VER
- gbp buildpackage -d -S -uc -us --git-export-dir=$PWD/../data --git-debian-branch=$VER
- cd ../$PROJ/$1
+ gbp buildpackage -d -S -uc -us --git-export-dir=$TOP/data --git-debian-branch=$VER
+ cd $TOP/$PROJ/$1
osc rm * || true
- mv ../../data/*.dsc .
- mv ../../data/*.tar* .
+ mv $TOP/data/*.dsc .
+ mv $TOP/data/*.tar* .
osc add *
- cd ../../
+ cd $TOP
}
PACKAGES="
@@ -58,5 +60,5 @@ for p in $PACKAGES; do
build $p
done
-cd $PROJ
+cd $TOP/$PROJ
osc ci -m "Latest Tagged versions of $DT"