From 050b93514aa2f6f23e48d069c68b0a70fce87e76 Mon Sep 17 00:00:00 2001 From: George Danchev Date: Mon, 27 Jun 2011 14:31:39 +0000 Subject: [PATCH] implement -keep --- releng/releng_build_isojigdo | 14 +++++++------- releng/run_all_releng | 2 +- releng/template_new_releng | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/releng/releng_build_isojigdo b/releng/releng_build_isojigdo index 5b57bf41..1162c117 100755 --- a/releng/releng_build_isojigdo +++ b/releng/releng_build_isojigdo @@ -12,7 +12,7 @@ IMG="" ISOLINUX_BIN="" BOOT_CAT="" CONFFILE=$HOME/releng_build_isojigdo.conf -CLEAN=0 +KEEP=0 GEN_DATA_DIR=$0.result RES="" @@ -21,9 +21,9 @@ print_help() { Usage: $0 -help # using a config file ${CONFFILE} - $0 -rc [-clean] + $0 -rc [-keep] # without using a config file - $0 xorriso_cmd IN_dir OUT_image [IN_isolinux] [OUT_bootcat] [-clean] + $0 xorriso_cmd IN_dir OUT_image [IN_isolinux] [OUT_bootcat] [-keep] HLP } @@ -44,7 +44,7 @@ if [ "${1}" == "-rc" ]; then else echo -e "\n$0: Config file ${CONFFILE} not found.\n" && exit 20 fi - if [ "${2}" == "-clean" ]; then CLEAN=1; fi + if [ "${2}" == "-keep" ]; then KEEP=1; fi # command line args elif [ "${3}" ]; then XOR="${1}" @@ -53,7 +53,7 @@ elif [ "${3}" ]; then if [ "${4}" ]; then ISOLINUX_BIN="${4}" if [ "${5}" ]; then BOOT_CAT="${5}"; fi - if [ "${4}" == "-clean" -o "${5}" == "-clean" -o "${6}" == "-clean" ]; then CLEAN=1; fi + if [ "${4}" == "-keep" -o "${5}" == "-keep" -o "${6}" == "-keep" ]; then KEEP=1; fi fi # the rest else @@ -172,14 +172,14 @@ case ${DIFF_RET} in esac # sort out the cruft -if [ ${CLEAN} -eq 1 ]; then +if [ ${KEEP} -eq 0 ]; then # safety net, just in case -> we want to be in the starting # directory before removing whatever self-generated stuff cd "${START_DIR_DONT_CHANGE}" || exit 80 rm -rf ${GEN_DATA_DIR} printf "$0: removed %s\n" ${GEN_DATA_DIR} else - printf "$0: left %s\n" ${GEN_DATA_DIR} + printf "$0: leaving %s\n" ${GEN_DATA_DIR} fi # last hints diff --git a/releng/run_all_releng b/releng/run_all_releng index b5a82fbb..a2f45230 100755 --- a/releng/run_all_releng +++ b/releng/run_all_releng @@ -21,7 +21,7 @@ for s in `ls | grep ^releng_ | grep -v ${SELF} | sort`; do T1=`date '+%s'` set +e # -rc -clean are shared options amongst the all releng scripts - ./${s} -rc -clean 1>>${CLOG1} 2>>${CLOG2} + ./${s} -rc 1>>${CLOG1} 2>>${CLOG2} RET=$? T2=`date '+%s'` let TS="${T2}-${T1}" diff --git a/releng/template_new_releng b/releng/template_new_releng index d9e5d11b..32b9bdf4 100755 --- a/releng/template_new_releng +++ b/releng/template_new_releng @@ -11,7 +11,7 @@ START_DIR_DONT_CHANGE=`pwd` # config file CONFFILE=$HOME/TODO.conf -CLEAN=0 +KEEP=0 ##################################################################### print_help() { @@ -19,7 +19,7 @@ print_help() { Usage: $0 -help # using a config file ${CONFFILE} - $0 -rc [-clean] + $0 -rc [-keep] # without using a config file $0 HLP