From ffe2d5ef8a4d929a1dffc75fd4629b941e118a51 Mon Sep 17 00:00:00 2001 From: Anirudha Bose Date: Tue, 24 Jun 2014 22:27:13 +0530 Subject: [PATCH] Produce an error when no arrguments are passed to cpt.sh --- tools/packaging/cpt.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/packaging/cpt.sh b/tools/packaging/cpt.sh index 0872f2d4..9994a09d 100755 --- a/tools/packaging/cpt.sh +++ b/tools/packaging/cpt.sh @@ -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