Skip to content

Commit 54047c8

Browse files
committed
Exit when a mv or cp fails (Sjoerd Mullender).
1 parent e6e8cdc commit 54047c8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

install-sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ dsttmp=$dstdir/#inst.$$#
102102

103103
# Move or copy the file name to the temp name
104104

105-
$doit $instcmd $src $dsttmp
105+
$doit $instcmd $src $dsttmp || exit $?
106106

107107
# and set any options; do chmod last to preserve setuid bits
108108

@@ -114,7 +114,7 @@ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi
114114
# Now rename the file to the real destination.
115115

116116
$doit $rmcmd $dst
117-
$doit $mvcmd $dsttmp $dst
117+
$doit $mvcmd $dsttmp $dst || exit $?
118118

119119

120120
exit 0

0 commit comments

Comments
 (0)