summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2016-10-17 20:52:11 +0200
committerHolger Levsen <holger@layer-acht.org>2016-10-18 13:02:49 +0200
commit9d51bc382150e50278a82e117a2c592740b79bc6 (patch)
tree7dafc11105a47b257443b31257b53c0924157ce5
parentb28b66d9b5296c16362416ac160eda2a2b0c4ed9 (diff)
downloadjenkins.debian.net-9d51bc382150e50278a82e117a2c592740b79bc6.tar.xz
reproducible/openwrt|lede: use the same directory for lede and openwrt
make it simpler not have $TYPE everywhere to get the full build path Signed-off-by: Holger Levsen <holger@layer-acht.org>
-rw-r--r--bin/reproducible_openwrt_common.sh27
1 files changed, 13 insertions, 14 deletions
diff --git a/bin/reproducible_openwrt_common.sh b/bin/reproducible_openwrt_common.sh
index d671c24a..dc17fa04 100644
--- a/bin/reproducible_openwrt_common.sh
+++ b/bin/reproducible_openwrt_common.sh
@@ -83,11 +83,11 @@ node_save_logs() {
exit 1
fi
- if [ ! -d "$tmpdir/build/logs" ] ; then
+ if [ ! -d "$tmpdir/build/source/logs" ] ; then
# we create an empty tar.xz instead of failing
touch "$tmpdir/build_logs.tar.xz"
else
- tar cJf "$tmpdir/build_logs.tar.xz" -C "$tmpdir/build/" ./logs
+ tar cJf "$tmpdir/build_logs.tar.xz" -C "$tmpdir/build/source" ./logs
fi
}
@@ -237,19 +237,18 @@ openwrt_compile() {
# called by openwrt_two_times
# ssh $GENERIC_NODE1 reproducible_$TYPE node openwrt_download $TYPE $TARGET $CONFIG $TMPDIR
openwrt_download() {
- local TYPE=$1
- local TARGET=$2
- local CONFIG=$3
- local TMPDIR=$4
+ local TARGET=$1
+ local CONFIG=$2
+ local TMPDIR=$3
cd $TMPDIR/download
# checkout the repo
- echo "============================================================================="
- echo "$(date -u) - Cloning $TYPE git repository."
- echo "============================================================================="
- git clone -b $OPENWRT_GIT_BRANCH $OPENWRT_GIT_REPO $TYPE
- cd $TYPE
+ echo "================================================================================"
+ echo "$(date -u) - Cloning git repository from $OPENWRT_GIT_REPO $OPENWRT_GIT_BRANCH. "
+ echo "================================================================================"
+ git clone -b $OPENWRT_GIT_BRANCH $OPENWRT_GIT_REPO source
+ cd source
# update feeds
#./scripts/feeds update
@@ -263,7 +262,7 @@ openwrt_download() {
openwrt_get_banner() {
TMPDIR=$1
TYPE=$2
- cd $TMPDIR/build/$TYPE
+ cd $TMPDIR/build/source
find build_dir/ -name banner | grep etc/banner|head -1| xargs cat /dev/null
}
@@ -285,7 +284,7 @@ openwrt_build() {
mv "$TMPDIR/download" "$TMPBUILDDIR"
# openwrt/lede is checkouted under /download
- cd $TMPBUILDDIR/$TYPE
+ cd $TMPBUILDDIR/source
# set tz, date, core, ..
openwrt_apply_variations $RUN
@@ -321,7 +320,7 @@ build_two_times() {
mkdir -p $WORKSPACE/results/
# download and prepare openwrt on node b1
- ssh $GENERIC_NODE1 reproducible_$TYPE node openwrt_download $TYPE $TARGET $CONFIG $TMPDIR
+ ssh $GENERIC_NODE1 reproducible_$TYPE node openwrt_download $TARGET $CONFIG $TMPDIR
echo "== master"
ls -la "$TMPDIR/download/" || true