Default to $CWD in all case in parsing.sh
This commit is contained in:
parent
5750bea31f
commit
c5507590aa
|
@ -27,31 +27,27 @@ parse_args ()
|
|||
{
|
||||
local opt optNum -
|
||||
|
||||
if [ $# -gt 0 ]
|
||||
then
|
||||
optNum=0
|
||||
while [ $# -gt $optNum ]
|
||||
do
|
||||
optNum=$((optNum + 1))
|
||||
eval opt=\$$optNum
|
||||
case $opt in
|
||||
"-e")
|
||||
if [ $# -gt $optNum ]
|
||||
then
|
||||
optNum=$((optNum + 1))
|
||||
eval opt=\$$optNum
|
||||
eval "$opt"
|
||||
else
|
||||
echo "Missing argument after \"-e\""
|
||||
return 1
|
||||
fi ;;
|
||||
*)
|
||||
logDir="$opt" ;;
|
||||
esac
|
||||
done
|
||||
else
|
||||
logDir=$(pwd)
|
||||
fi
|
||||
logDir=$(pwd)
|
||||
optNum=0
|
||||
while [ $# -gt $optNum ]
|
||||
do
|
||||
optNum=$((optNum + 1))
|
||||
eval opt=\$$optNum
|
||||
case $opt in
|
||||
"-e")
|
||||
if [ $# -gt $optNum ]
|
||||
then
|
||||
optNum=$((optNum + 1))
|
||||
eval opt=\$$optNum
|
||||
eval "$opt"
|
||||
else
|
||||
echo "Missing argument after \"-e\""
|
||||
return 1
|
||||
fi ;;
|
||||
*)
|
||||
logDir="$opt" ;;
|
||||
esac
|
||||
done
|
||||
return 0
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue