diff options
| author | cvs2svn <cvs2svn@FreeBSD.org> | 1998-03-24 11:00:04 +0000 |
|---|---|---|
| committer | cvs2svn <cvs2svn@FreeBSD.org> | 1998-03-24 11:00:04 +0000 |
| commit | 49bb4432503ea0590b0639b2e328e177b42e0e25 (patch) | |
| tree | 164e74ba33bdd6d1dea9f5d32d261eda6f50e99b /usr.bin | |
| parent | c07eac88c8860b0a1f42c1f95992c53a0554ff83 (diff) | |
This commit was manufactured by cvs2svn to create tagrelease/2.2.6
'RELENG_2_2_6_RELEASE'.
Diffstat (limited to 'usr.bin')
| -rw-r--r-- | usr.bin/shar/shar.sh | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/usr.bin/shar/shar.sh b/usr.bin/shar/shar.sh index 08db22c97a0e..bf541c0d0c97 100644 --- a/usr.bin/shar/shar.sh +++ b/usr.bin/shar/shar.sh @@ -35,10 +35,18 @@ # if [ $# -eq 0 ]; then - echo 'usage: shar file ...' - exit 1 + echo 'usage: shar file ...' 1>&2 + exit 64 # EX_USAGE fi +for i +do + if [ ! \( -d $i -o -r $i \) ]; then + echo "$i inaccessible or not exist" 1>&2 + exit 66 # EX_NOINPUT + fi +done + cat << EOF # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may @@ -64,7 +72,7 @@ do else echo "echo x - $i" echo "sed 's/^X//' >$i << 'END-of-$i'" - sed 's/^/X/' $i + sed 's/^/X/' $i || exit echo "END-of-$i" fi done |
