summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_openwrt.sh
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2016-07-13 17:58:35 +0200
committerHolger Levsen <holger@layer-acht.org>2016-07-13 21:01:15 +0200
commited2a6d02cf2dce887ba4f319e83852115189f1e8 (patch)
tree63d7fe6d848cc1b0fe422370648bb632f5da7f1e /bin/reproducible_openwrt.sh
parentb42fb00030cfacc9475071aa6a8068ca3f46531c (diff)
downloadjenkins.debian.net-ed2a6d02cf2dce887ba4f319e83852115189f1e8.tar.xz
reproducible openwrt: add lede_save_results
lede has a slight different output directory layout Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'bin/reproducible_openwrt.sh')
-rwxr-xr-xbin/reproducible_openwrt.sh41
1 files changed, 41 insertions, 0 deletions
diff --git a/bin/reproducible_openwrt.sh b/bin/reproducible_openwrt.sh
index 1de18e0a..7f1338ec 100755
--- a/bin/reproducible_openwrt.sh
+++ b/bin/reproducible_openwrt.sh
@@ -2,6 +2,7 @@
# Copyright 2014-2015 Holger Levsen <holger@layer-acht.org>
# © 2015 Reiner Herrmann <reiner@reiner-h.de>
+# 2016 Alexander Couzens <lynxis@fe80.eu>
# released under the GPLv=2
OPENWRT_GIT_REPO=git://git.openwrt.org/openwrt.git
@@ -37,6 +38,46 @@ save_openwrt_logs() {
tar cJf "$BASE/openwrt/dbd/logs_${postfix}.tar.xz" logs/
}
+save_lede_results() {
+ RUN=$1
+ cd bin/targets
+ for target in * ; do
+ pushd $target || continue
+ for subtarget in * ; do
+ pushd $subtarget || continue
+
+ # save firmware images
+ mkdir -p $TMPDIR/$RUN/$target/$subtarget/
+ for image in $(find * -name "*.bin" -o -name "*.squashfs") ; do
+ cp -p $image $TMPDIR/$RUN/$target/$subtarget/
+ done
+
+ # save subtarget specific packages
+ if [ -d packages ] ; then
+ pushd packages
+ for package in $(find * -name "*.ipk") ; do
+ mkdir -p $TMPDIR/$RUN/packages/$target/$subtarget/$(dirname $package)
+ cp -p $package $TMPDIR/$RUN/packages/$target/$subtarget/$(dirname $package)/
+ done
+ popd
+ fi
+ done
+ popd
+ done
+
+ # arch is like mips_34kc_dsp
+ popd bin/packages/
+ for arch in * ; do
+ pushd $arch || continue
+ for package in $(find * -name "*.ipk") ; do
+ mkdir -p $TMPDIR/$RUN/packages/$arch/$(dirname $package)
+ cp -p $package $TMPDIR/$RUN/packages/$arch/$(dirname $package)/
+ done
+ popd
+ done
+ pushd
+}
+
save_openwrt_results() {
RUN=$1
cd bin