Produce an error when no arrguments are passed to cpt.sh

This commit is contained in:
Anirudha Bose 2014-06-24 22:27:13 +05:30 committed by sftnight
parent a4a17a8b9a
commit ffe2d5ef8a

View File

@ -62,7 +62,12 @@ EOT
}
while [ "${1}" != "" ]; do
while true; do
if [ "${1}" = "" ]; then
echo "Error: No arguments passed"
usage
fi
if [ "${#}" != "1" ]; then
echo "Error: cannot handle multiple switches"
usage