From 179006f49515992aafb7312780adb41dd2ada9e5 Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Thu, 7 Mar 2002 08:32:26 +0000 Subject: make zrecompile show the error messages from zcompile unless the -q option is given (16774) --- Functions/Misc/zrecompile | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'Functions') 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 -- cgit 1.4.1