diff options
author | itojun <itojun@FreeBSD.org> | 1997-08-28 14:35:09 +0000 |
---|---|---|
committer | itojun <itojun@FreeBSD.org> | 1997-08-28 14:35:09 +0000 |
commit | a7e970a8d935d4eea311ff14fb5bbbbb6480b72c (patch) | |
tree | 5913c15324aef5fb49b77893e20f3417b1902ed2 | |
parent | 43150752a02cfa86f35630b861e524eeb748fd52 (diff) | |
download | FreeBSD-src-a7e970a8d935d4eea311ff14fb5bbbbb6480b72c.zip FreeBSD-src-a7e970a8d935d4eea311ff14fb5bbbbb6480b72c.tar.gz |
To cope with shell archive file generated by GNU sharutils 4.2.
(it assumes that shar will bark if there's invalid argument specified)
Patch suggested by Ulrich Drepper <drepper@ipd.info.uni-karlsruhe.de>.
Reviewed by: joerg_wunsch@uriah.heep.sax.de
-rw-r--r-- | usr.bin/shar/shar.sh | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/usr.bin/shar/shar.sh b/usr.bin/shar/shar.sh index 08db22c..f38d92b 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 [ ! -e $i ]; then + echo "$i does 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 |