summaryrefslogtreecommitdiffstats
path: root/usr.bin/shar/shar.sh
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/shar/shar.sh')
-rw-r--r--usr.bin/shar/shar.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/shar/shar.sh b/usr.bin/shar/shar.sh
index f38d92b..bf541c0 100644
--- a/usr.bin/shar/shar.sh
+++ b/usr.bin/shar/shar.sh
@@ -41,8 +41,8 @@ fi
for i
do
- if [ ! -e $i ]; then
- echo "$i does not exist" 1>&2
+ if [ ! \( -d $i -o -r $i \) ]; then
+ echo "$i inaccessible or not exist" 1>&2
exit 66 # EX_NOINPUT
fi
done
@@ -72,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
OpenPOWER on IntegriCloud