diff options
Diffstat (limited to 'etc')
-rw-r--r-- | etc/functions/fdie | 3 | ||||
-rw-r--r-- | etc/functions/newsbeuter | 2 | ||||
-rw-r--r-- | etc/functions/off | 2 | ||||
-rw-r--r-- | etc/functions/put | 10 |
4 files changed, 8 insertions, 9 deletions
diff --git a/etc/functions/fdie b/etc/functions/fdie deleted file mode 100644 index 2cbda7a..0000000 --- a/etc/functions/fdie +++ /dev/null @@ -1,3 +0,0 @@ -## vim:ft=zsh -echo -e "\e[1;31m${*}\e[0m" > /dev/stderr -return 1 diff --git a/etc/functions/newsbeuter b/etc/functions/newsbeuter index 0c8c646..3756183 100644 --- a/etc/functions/newsbeuter +++ b/etc/functions/newsbeuter @@ -3,7 +3,7 @@ function __sync { if [[ $HOST != aneurysm ]] { - unisync unison aneurysm .newsbeuter || fdie "sync failed" + unisync unison aneurysm .newsbeuter } } diff --git a/etc/functions/off b/etc/functions/off index f1c104d..36e5aeb 100644 --- a/etc/functions/off +++ b/etc/functions/off @@ -33,7 +33,7 @@ while [[ $1 == -* ]] { return 0 ;; -|--) shift; break ;; - *) fdie "Unrecognized option: $1"; return 1 ;; + *) echo "Unrecognized option: $1" >&2 ; return 1 ;; esac shift } diff --git a/etc/functions/put b/etc/functions/put index f0be248..40e73bd 100644 --- a/etc/functions/put +++ b/etc/functions/put @@ -79,9 +79,11 @@ if [[ -f $1 ]] { } shift hosts } - fdie "Tried uploading to $n_hosts hosts without success" - ((n_ping)) && fdie " - $n_ping hosts are unreachable" - ((n_curl)) && fdie " - $n_curl errors while uploading" + echo "Tried uploading to $n_hosts hosts without success" >&2 + ((n_ping)) && echo " - $n_ping hosts are unreachable" >&2 + ((n_curl)) && echo " - $n_curl errors while uploading" >&2 + return 1 } else { - fdie "$1: No such file" + echo "$1: No such file" + return 1 } |