From 92c5c7f2fd85289f776860d826f8b61fdd6a8dbc Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Sat, 23 Jul 2016 00:11:16 +0200 Subject: openwrt_common: make save_openwrt_log more flexible to support lede Signed-off-by: Holger Levsen --- bin/reproducible_openwrt_common.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/bin/reproducible_openwrt_common.sh b/bin/reproducible_openwrt_common.sh index 745a601c..c280d05c 100644 --- a/bin/reproducible_openwrt_common.sh +++ b/bin/reproducible_openwrt_common.sh @@ -22,10 +22,13 @@ create_results_dirs() { mkdir -p $BASE/openwrt/dbd } -save_openwrt_logs() { - local postfix="$1" +# type = openwrt or lede +# postfix = we use the postfix to save difference of the first and second build +save_logs() { + local type="$1" + local postfix="$2" - tar cJf "$BASE/openwrt/dbd/logs_${postfix}.tar.xz" logs/ + tar cJf "$BASE/${type}/dbd/logs_${postfix}.tar.xz" logs/ } save_lede_results() { @@ -157,7 +160,7 @@ build_two_times() { [ "$TYPE" = "openwrt" ] && save_openwrt_results b1 # copy logs - save_openwrt_logs b1 + save_logs $TYPE b1 # clean up between builds openwrt_cleanup @@ -179,7 +182,7 @@ build_two_times() { [ "$TYPE" = "openwrt" ] && save_openwrt_results b2 # copy logs - save_openwrt_logs b2 + save_logs $TYPE b2 # reset environment to default values again export LANG="en_GB.UTF-8" -- cgit v1.2.3-70-g09d2