summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBo Ørsted Andresen <bo.andresen@zlin.dk>2008-11-07 01:23:30 +0100
committerBo Ørsted Andresen <bo.andresen@zlin.dk>2008-11-07 01:23:30 +0100
commit225f42b9e05a554cf722d0d630a87d33a8ace08c (patch)
tree6048bd5cc1c8babd02a69e79741277052122c6ad
parente666355355be8396a2375a8e5b4224682831ca98 (diff)
downloadwgetpaste-225f42b9e05a554cf722d0d630a87d33a8ace08c.tar.gz
Make --list-languages and --list-expirations exit with error when the specified pastebin has no support for them.
-rwxr-xr-xwgetpaste4
1 files 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//\%/ }"