From 44210832c40aa2df9688fa3e2ce996180ac0fdcc Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Fri, 15 Jul 2011 14:10:05 +0000 Subject: [PATCH] Changed general option -k -c -f in releng_getopts.inc --- .../trunk/releng/inc/releng_getopts.inc | 34 ++++++++----------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/libisoburn/trunk/releng/inc/releng_getopts.inc b/libisoburn/trunk/releng/inc/releng_getopts.inc index 2d2490c4..00d61e9c 100644 --- a/libisoburn/trunk/releng/inc/releng_getopts.inc +++ b/libisoburn/trunk/releng/inc/releng_getopts.inc @@ -6,7 +6,7 @@ SELF=$(basename $0) RELENG_XORRISO=0 KEEP=0 SIMULATE_FAILURE=0 -CLEANUP=1 +CLEANUP=0 RELENG_PRINTED_HELP=0 START_DIR_DONT_CHANGE=`pwd` @@ -16,14 +16,13 @@ GEN_DATA_DIR=releng_generated_data/${SELF} print_help() { cat << EOF -Usage: $SELF -x path/to/xorriso [-k0|1] [-f0|1] [-c0|1] [-h] +Usage: $SELF -x path/to/xorriso [-k] [-f] [-c] [-h] [-- ...test specific options...] General options: - -x absolute or relative path to binary to be run. - -k keep selfgenerated data (values 0,1, default 0). - -c cleanup selfgenerated data kept from previous - run and exit (values 0,1, default 0). - -f simulate failure (values 0,1, default 0). + -x absolute or relative path to xorriso binary to be run. + -k keep selfgenerated data. + -c cleanup selfgenerated data kept from previous run and exit. + -f simulate failure. -- end of general options, begin of test specific options. EOF } @@ -83,6 +82,8 @@ cleanup() { fi } +############################################# + check_for_xorriso() { # $1: if "-x" then check executability @@ -90,7 +91,8 @@ check_for_xorriso() { then print_help # print_specific_help - echo "${SELF}: Need -x absolute or relative path to binary to be run." + echo + echo "${SELF}: Need -x absolute or relative path to xorriso binary." echo exit 31 fi @@ -98,6 +100,7 @@ check_for_xorriso() { then print_help # print_specific_help + echo echo "${SELF}: Path given by option -x does not lead to an executable file." echo "Given is: '$RELENG_XORRISO'" if test "$RELENG_XORRISO" = "xorriso" @@ -129,22 +132,13 @@ do elif test x"$i" = x"-x" then next_is="x" - elif test x"$i" = x"-k" -o x"$i" = x"-k0" - then - KEEP=0 - elif test x"$i" = x"-k1" + elif test x"$i" = x"-k" then KEEP=1 - elif test x"$i" = x"-c" -o x"$i" = x"-c0" - then - CLEANUP=0 - elif test x"$i" = x"-c1" + elif test x"$i" = x"-c" then CLEANUP=1 - elif test x"$i" = x"-f" -o x"$i" = x"-f0" - then - SIMULATE_FAILURE=0 - elif test x"$i" = x"-f1" + elif test x"$i" = x"-f" then SIMULATE_FAILURE=1 elif test x"$i" = x"-h"