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
#############################################
while getopts "x:k:c:f:h" OPT
next_is=
for i in "$@"
do
case $OPT in
x)
RELENG_XORRISO=$OPTARG
;;
c)
if test "$next_is" = "ignore"
then
dummy=dummy
elif test "$next_is" = "x"
then
RELENG_XORRISO="$i"
next_is=
elif test x"$i" = x"-x"
then
next_is="x"
elif test x"$i" = x"-c"
then
CLEANUP_LOG=1
;;
*)
;;
esac
fi
done
#############################################
if [ ! "${1}" ]; then
cat << HLP
@ -52,10 +58,10 @@ required space for these data is about 300 megabytes.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
examples:
# 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
$ ./${SELF} -c1
$ ./${SELF} -c
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HLP
exit 31