From 225f42b9e05a554cf722d0d630a87d33a8ace08c Mon Sep 17 00:00:00 2001 From: Bo Ørsted Andresen Date: Fri, 7 Nov 2008 01:23:30 +0100 Subject: Make --list-languages and --list-expirations exit with error when the specified pastebin has no support for them. --- wgetpaste | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wgetpaste b/wgetpaste index 27b173f..ee04ecd 100755 --- a/wgetpaste +++ b/wgetpaste @@ -329,7 +329,7 @@ showlanguages() { echo "Languages supported by $(getrecipient) (case sensitive):" local l lang d lang=LANGUAGES_$ENGINE - [[ -z ${!lang} ]] && echo "$N\"$ENGINE\" has no support for setting language." >&2 + [[ -z ${!lang} ]] && echo "$N\"$ENGINE\" has no support for setting language." >&2 && exit 1 for l in ${!lang}; do [[ ${l//\%/ } = $DEFAULT_LANGUAGE ]] && d="*" || d=" " echo " $d${l//\%/ }" @@ -341,7 +341,7 @@ showexpirations() { local e expiration info d expiration=EXPIRATIONS_$ENGINE info=EXPIRATION_INFO_$SERVICE - [[ -z ${!expiration} ]] && echo "$N${!info}\"$ENGINE\" has no support for setting expiration." >&2 + [[ -z ${!expiration} ]] && echo "$N${!info}\"$ENGINE\" has no support for setting expiration." >&2 && exit 1 for e in ${!expiration}; do [[ ${e//\%/ } = $DEFAULT_EXPIRATION ]] && d="*" || d=" " echo " $d${e//\%/ }" -- cgit v1.2.3