rework to match latest option handling

This commit is contained in:
George Danchev 2011-07-15 17:57:05 +00:00
parent 54855eb89e
commit eefda84832
1 changed files with 19 additions and 13 deletions

View File

@ -25,19 +25,25 @@ RELENG_XORRISO=
CLEANUP_LOG=0 CLEANUP_LOG=0
############################################# #############################################
while getopts "x:k:c:f:h" OPT next_is=
for i in "$@"
do do
case $OPT in if test "$next_is" = "ignore"
x) then
RELENG_XORRISO=$OPTARG dummy=dummy
;; elif test "$next_is" = "x"
c) then
CLEANUP_LOG=1 RELENG_XORRISO="$i"
;; next_is=
*) elif test x"$i" = x"-x"
;; then
esac next_is="x"
elif test x"$i" = x"-c"
then
CLEANUP_LOG=1
fi
done done
#############################################
if [ ! "${1}" ]; then if [ ! "${1}" ]; then
cat << HLP cat << HLP
@ -52,10 +58,10 @@ required space for these data is about 300 megabytes.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
examples: examples:
# run xorriso and keep the self generated data # run xorriso and keep the self generated data
$ ./${SELF} -x path/to/xorriso [-k1] $ ./${SELF} -x path/to/xorriso [-k]
# clean up self generated data from previous run # clean up self generated data from previous run
$ ./${SELF} -c1 $ ./${SELF} -c
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HLP HLP
exit 31 exit 31