Module Name: src
Committed By: ginsbach
Date: Sat Dec 31 03:33:53 UTC 2022
Modified Files:
src/usr.bin/shar: shar.sh
Log Message:
make sure a sed failure in the generated archive stops execution
Code from Dave Sainty in PR bin/11107 (similar in FreeBSD)
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/shar/shar.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/shar/shar.sh
diff -u src/usr.bin/shar/shar.sh:1.3 src/usr.bin/shar/shar.sh:1.4
--- src/usr.bin/shar/shar.sh:1.3 Thu Jun 30 02:36:35 2005
+++ src/usr.bin/shar/shar.sh Sat Dec 31 03:33:53 2022
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $NetBSD: shar.sh,v 1.3 2005/06/30 02:36:35 perry Exp $
+# $NetBSD: shar.sh,v 1.4 2022/12/31 03:33:53 ginsbach Exp $
#
# Copyright (c) 1990, 1993
# The Regents of the University of California. All rights reserved.
@@ -62,7 +62,7 @@ do
else
echo "echo x - $i"
echo "sed 's/^X//' >$i << 'END-of-$i'"
- sed 's/^/X/' $i
+ sed 's/^/X/' $i || exit 1
echo "END-of-$i"
fi
done