diff options
author | Bart Schaefer <barts@users.sourceforge.net> | 2004-03-31 16:48:37 +0000 |
---|---|---|
committer | Bart Schaefer <barts@users.sourceforge.net> | 2004-03-31 16:48:37 +0000 |
commit | 1f03c7a78412984bd7153c996be2a9c530893bf2 (patch) | |
tree | dc4110dfd455e7bd566ef7b7a5a6c90e9b2eb121 /Functions/Misc/zrecompile | |
parent | 3876601c794b57342d14152bef1884f2a4213621 (diff) | |
download | zsh-1f03c7a78412984bd7153c996be2a9c530893bf2.tar.gz zsh-1f03c7a78412984bd7153c996be2a9c530893bf2.tar.xz zsh-1f03c7a78412984bd7153c996be2a9c530893bf2.zip |
unposted: change "mv" to "mv -f" when backing up .zwc files in zrecompile
Diffstat (limited to 'Functions/Misc/zrecompile')
-rw-r--r-- | Functions/Misc/zrecompile | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Functions/Misc/zrecompile b/Functions/Misc/zrecompile index 0db27f497..8fe990086 100644 --- a/Functions/Misc/zrecompile +++ b/Functions/Misc/zrecompile @@ -129,10 +129,10 @@ if [[ -n $pats ]]; then # old file by renaming it. if [[ -z "$quiet" ]] && - { [[ ! -f $zwc ]] || mv $zwc ${zwc}.old } && + { [[ ! -f $zwc ]] || mv -f $zwc ${zwc}.old } && zcompile $map $tmp $zwc $files; then print succeeded - elif ! { { [[ ! -f $zwc ]] || mv $zwc ${zwc}.old } && + elif ! { { [[ ! -f $zwc ]] || mv -f $zwc ${zwc}.old } && zcompile $map $tmp $zwc $files 2> /dev/null } then [[ -z $quiet ]] && print "re-compiling ${zwc}: failed" ret=1 @@ -233,10 +233,10 @@ for zwc; do # old file by renaming it. if [[ -z "$quiet" ]] && - mv $zwc ${zwc}.old && + mv -f $zwc ${zwc}.old && zcompile $map $zwc $files; then print $mesg - elif ! { mv $zwc ${zwc}.old && + elif ! { mv -f $zwc ${zwc}.old && zcompile $map $zwc $files 2> /dev/null } then [[ -z $quiet ]] && print "re-compiling ${zwc}: failed" ret=1 |