summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2002-04-14 18:01:49 +0000
committerJonas Smedegaard <dr@jones.dk>2002-04-14 18:01:49 +0000
commita291804ba74b2a4f73e6ad359c8868e67888bd98 (patch)
tree01e9729e9661012479709d18eaef0496a53aca97
parentaa0439502aa136770198c8a12f5a549197c4ecec (diff)
Improve support for non-X11 dosemu sessions.
-rwxr-xr-xnavi17
1 files changed, 13 insertions, 4 deletions
diff --git a/navi b/navi
index 9394e9a..f44b03c 100755
--- a/navi
+++ b/navi
@@ -19,7 +19,7 @@ usage () {
echo "Usage: $(basename $0) [-x] [{target}]"
}
-if [ "x$1" != "x" ]; then
+if [ -n "$1" ]; then
target=$1
shift
fi
@@ -31,8 +31,17 @@ if [ $help ]; then
exit 1
fi
-prg=/usr/bin/dos
-[ $x ] && prg=/usr/bin/xdos
-[ -x $prg ] || prg=/usr/bin/xdosemu
+if [ ! -e "~/$target/.dosemurc" ]; then
+ echo "Wrong target!"
+ exit 1
+fi
+
+if [ -n "$x" ]; then
+ prg=/usr/bin/xdos
+ [ -x $prg ] || prg=/usr/bin/xdosemu
+else
+ prg=/usr/bin/dos
+ [ -x $prg ] || prg=/usr/bin/dosemu.bin
+fi
$prg -f ~/$target/.dosemurc