diff options
author | Bo Ørsted Andresen <bo.andresen@zlin.dk> | 2008-11-07 01:23:30 +0100 |
---|---|---|
committer | Bo Ørsted Andresen <bo.andresen@zlin.dk> | 2008-11-07 01:23:30 +0100 |
commit | 225f42b9e05a554cf722d0d630a87d33a8ace08c (patch) | |
tree | 6048bd5cc1c8babd02a69e79741277052122c6ad | |
parent | e666355355be8396a2375a8e5b4224682831ca98 (diff) | |
download | wgetpaste-225f42b9e05a554cf722d0d630a87d33a8ace08c.tar.gz |
Make --list-languages and --list-expirations exit with error when the specified pastebin has no support for them.
-rwxr-xr-x | wgetpaste | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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//\%/ }" |