summaryrefslogtreecommitdiff
path: root/navi
diff options
context:
space:
mode:
Diffstat (limited to 'navi')
-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