Skip to content

Commit

Permalink
Exit when a mv or cp fails (Sjoerd Mullender).
Browse files Browse the repository at this point in the history
  • Loading branch information
gvanrossum committed Aug 13, 1998
1 parent e6e8cdc commit 54047c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions install-sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

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

0 comments on commit 54047c8

Please sign in to comment.