diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2001-11-08 20:59:59 -0500 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2001-11-08 20:59:59 -0500 |
commit | 6cb04c09f063188e7dae5d1e5e5c69eb64703626 (patch) | |
tree | 46c2950351bf3f2cde1f610eae7bc9cfb52c5221 /samples/keepviewer | |
parent | f78e27712a4f44dbdf3c1532c3d1958989bf40a5 (diff) | |
download | lynx-snapshots-6cb04c09f063188e7dae5d1e5e5c69eb64703626.tar.gz |
snapshot of project "lynx", label v2-8-5dev_4
Diffstat (limited to 'samples/keepviewer')
-rwxr-xr-x | samples/keepviewer | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/samples/keepviewer b/samples/keepviewer index 92e8f768..f5c0b2c1 100755 --- a/samples/keepviewer +++ b/samples/keepviewer @@ -8,8 +8,13 @@ # Parameters: # $1 is viewer # $2 is filename -chmod 600 $2 -myfile=`echo $2 | sed -e 's@\(.*/tmp/\)\([^/]*/\)\?\(.*\)@\1my\3@'` -ln $2 $myfile || exit 1 -trap "rm -f $myfile" 0 1 2 5 15 -eval $1 $myfile +if test $# = 2 ; then + chmod 600 $2 + myfile=`echo $2 | sed -e 's@\(.*/tmp/\)\([^/]*/\)\?\(.*\)@\1my\3@'` + ln $2 $myfile || exit 1 + trap "rm -f $myfile" 0 1 2 5 15 + eval $1 $myfile +else + echo "Usage: keepviewer <viewer> <filename>" + exit 1 +fi |