]> granicus.if.org Git - python/commitdiff
Exit when a mv or cp fails (Sjoerd Mullender).
authorGuido van Rossum <guido@python.org>
Thu, 13 Aug 1998 16:08:45 +0000 (16:08 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 13 Aug 1998 16:08:45 +0000 (16:08 +0000)
install-sh

index 98204c558a540dfb19d1c3cc4582bdb50a3a5a7a..014252ced45fc8a434a56ade318b63bd6e32e7ef 100755 (executable)
@@ -102,7 +102,7 @@ dsttmp=$dstdir/#inst.$$#
 
 # 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
 
@@ -114,7 +114,7 @@ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi
 # Now rename the file to the real destination.
 
 $doit $rmcmd $dst
-$doit $mvcmd $dsttmp $dst
+$doit $mvcmd $dsttmp $dst || exit $?
 
 
 exit 0