1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-01-17 22:31:12 +01:00

unposted: change "mv" to "mv -f" when backing up .zwc files in zrecompile

This commit is contained in:
Bart Schaefer 2004-03-31 16:48:37 +00:00
parent 3876601c79
commit 1f03c7a784
2 changed files with 10 additions and 4 deletions

View file

@ -1,3 +1,9 @@
2004-03-31 Bart Schaefer <schaefer@zsh.org>
* unposted: Functions/Misc/zrecompile: change "mv" to "mv -f"
when backing up .zwc files, because zcompile creates the files
read-only. See thread ending at users/7269.
2004-03-30 Oliver Kiddle <opk@zsh.org>
* 19708: Completion/compaudit: change getent() function to

View file

@ -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