Exit when a mv or cp fails (Sjoerd Mullender).

This commit is contained in:
Guido van Rossum 1998-08-13 16:08:45 +00:00
parent e6e8cdc748
commit 54047c84d1
1 changed files with 2 additions and 2 deletions

View File

@ -102,7 +102,7 @@ dsttmp=$dstdir/#inst.$$#
# Move or copy the file name to the temp name # Move or copy the file name to the temp name
$doit $instcmd $src $dsttmp $doit $instcmd $src $dsttmp || exit $?
# and set any options; do chmod last to preserve setuid bits # and set any options; do chmod last to preserve setuid bits
@ -114,7 +114,7 @@ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi
# Now rename the file to the real destination. # Now rename the file to the real destination.
$doit $rmcmd $dst $doit $rmcmd $dst
$doit $mvcmd $dsttmp $dst $doit $mvcmd $dsttmp $dst || exit $?
exit 0 exit 0