Skip to content

Commit

Permalink
Go back to square 1
Browse files Browse the repository at this point in the history
  • Loading branch information
wtgodbe committed Oct 26, 2018
1 parent 952f51f commit 209fa26
Showing 1 changed file with 34 additions and 2 deletions.
36 changes: 34 additions & 2 deletions CloneStuff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,42 @@

# Set default value for __retries
__retries=5
__command="ls"
__command=""

while :
do
if [ $# -le 0 ]; then
break
fi

lowerI="$(echo $1 | awk '{print tolower($0)}')"
case $lowerI in
command|-command)
if [ -n "$2" ]; then
__command="$2"
shift
else
echo "ERROR: 'command' requires a non-empty option argument"
exit 1
fi
;;
retries|-retries)
if [ -n "$2" ]; then
__retries="$2"
shift
else
echo "ERROR: 'retries' requires a non-empty option argument"
exit 1
fi
;;
*)
esac

shift
done

if [[ -z "$__command" ]]; then
echo "ERROR Please supply a value for '-command'"
echo "ERROR: Please supply a value for '-command'"
exit 2
fi

Expand Down

0 comments on commit 209fa26

Please sign in to comment.