aboutsummaryrefslogtreecommitdiffstats
path: root/fbgs
diff options
context:
space:
mode:
Diffstat (limited to 'fbgs')
-rwxr-xr-xfbgs10
1 files changed, 8 insertions, 2 deletions
diff --git a/fbgs b/fbgs
index 3b996b5..49fae6a 100755
--- a/fbgs
+++ b/fbgs
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
#
# PostScript/pdf viewer for the linux framebuffer console
@@ -18,7 +18,7 @@ passwd=""
device="png16m"
opt=1
bell="off"
-helptext="
+helptext="\
This program displays PostScript/pdf files using the linux framebuffer device.
It is a simple wrapper script for GhostScript and fbi.
@@ -38,6 +38,7 @@ usage: fbgs [fbgs options] [fbi options] file
Read the fbgs(1) and fbi(1) manpages for more details.
"
+[ $# -ne 0 ] || set -- -h
while test "$opt" = "1"; do
case "$1" in
# fbgs options
@@ -114,6 +115,11 @@ while test "$opt" = "1"; do
esac
done
+if [ ! -f "$1" ]; then
+ echo "fbgs: cannot stat '$1': No such file or directory"
+ exit 1
+fi
+
# run ghostscript
echo
echo "### rendering pages, please wait ... ###"