summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@server-speed.net>2011-06-03 23:03:47 +0200
committerFlorian Pritz <bluewind@server-speed.net>2011-06-03 23:03:47 +0200
commitcf447e75c675a7d5b87e8354060c5d46cdb17b8b (patch)
tree729a244d2d5bf0ed7e5a7d8824a822b5f77a41e2
parent73928f158c01da3edd20f7ef55afa7ec154142ff (diff)
display error when calling -d or -g without ID
Signed-off-by: Florian Pritz <bluewind@server-speed.net>
-rw-r--r--fb.in5
1 files changed, 4 insertions, 1 deletions
diff --git a/fb.in b/fb.in
index d4d60cf..c2e0af4 100644
--- a/fb.in
+++ b/fb.in
@@ -155,7 +155,10 @@ TMPDIR="`mktemp -d "/tmp/fb.XXXXXX"`"
trap "rm -rf '${TMPDIR}'" EXIT TERM
if [ "$DELETE" ] || [ "$GET" ]; then
- [ $# -eq 0 ] && exit 1;
+ if [ $# -eq 0 ]; then
+ echo "Error: no ID specified"
+ exit 1
+ fi
for i in "$@"; do
i=$(id_from_arg "$i")
if [ "$DELETE" ]; then