diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2002-03-07 08:32:26 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2002-03-07 08:32:26 +0000 |
commit | 179006f49515992aafb7312780adb41dd2ada9e5 (patch) | |
tree | 7b76b2ed981c1f61daaf2e237a39ce4ad6624e4d /Functions/Misc/zrecompile | |
parent | 824e519964843a1c7ca372b7fe0dc32b554e6929 (diff) | |
download | zsh-179006f49515992aafb7312780adb41dd2ada9e5.tar.gz zsh-179006f49515992aafb7312780adb41dd2ada9e5.tar.xz zsh-179006f49515992aafb7312780adb41dd2ada9e5.zip |
make zrecompile show the error messages from zcompile unless the -q option is given (16774)
Diffstat (limited to 'Functions/Misc/zrecompile')
-rw-r--r-- | Functions/Misc/zrecompile | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/Functions/Misc/zrecompile b/Functions/Misc/zrecompile index 325415157..0db27f497 100644 --- a/Functions/Misc/zrecompile +++ b/Functions/Misc/zrecompile @@ -128,11 +128,13 @@ if [[ -n $pats ]]; then # If the file is mapped, it might be mapped right now, so keep the # old file by renaming it. - if { [[ ! -f $zwc ]] || mv $zwc ${zwc}.old } && - zcompile $map $tmp $zwc $files 2> /dev/null; then - [[ -z $quiet ]] && print succeeded - else - [[ -z $quiet ]] && print failed + if [[ -z "$quiet" ]] && + { [[ ! -f $zwc ]] || mv $zwc ${zwc}.old } && + zcompile $map $tmp $zwc $files; then + print succeeded + elif ! { { [[ ! -f $zwc ]] || mv $zwc ${zwc}.old } && + zcompile $map $tmp $zwc $files 2> /dev/null } then + [[ -z $quiet ]] && print "re-compiling ${zwc}: failed" ret=1 fi fi @@ -230,10 +232,13 @@ for zwc; do # If the file is mapped, it might be mapped right now, so keep the # old file by renaming it. - if mv $zwc ${zwc}.old && zcompile $map $zwc $files 2> /dev/null; then - [[ -z $quiet ]] && print $mesg - else - [[ -z $quiet ]] && print failed + if [[ -z "$quiet" ]] && + mv $zwc ${zwc}.old && + zcompile $map $zwc $files; then + print $mesg + elif ! { mv $zwc ${zwc}.old && + zcompile $map $zwc $files 2> /dev/null } then + [[ -z $quiet ]] && print "re-compiling ${zwc}: failed" ret=1 fi fi |