summaryrefslogtreecommitdiff
path: root/Master/bin/x86_64-linux/xdvi
diff options
context:
space:
mode:
authorMartin Schröder <martin@oneiros.de>2008-07-19 16:50:58 +0000
committerMartin Schröder <martin@oneiros.de>2008-07-19 16:50:58 +0000
commit9d9f7d61e6e361ead351fe98b3fd046499b2f60d (patch)
treeb30d7b62e2b30b9ae2cb8c5b7fa597335945ad91 /Master/bin/x86_64-linux/xdvi
parentd87a2b6e583233e4dee1d04339e9d141fc20b526 (diff)
New binaries
git-svn-id: svn://tug.org/texlive/trunk@9677 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/bin/x86_64-linux/xdvi')
-rwxr-xr-xMaster/bin/x86_64-linux/xdvi19
1 files changed, 13 insertions, 6 deletions
diff --git a/Master/bin/x86_64-linux/xdvi b/Master/bin/x86_64-linux/xdvi
index 679b3f05aa7..29632097df1 100755
--- a/Master/bin/x86_64-linux/xdvi
+++ b/Master/bin/x86_64-linux/xdvi
@@ -17,15 +17,22 @@ test -f /bin/bsh && test -z "$RUNNING_BSH" \
&& { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1+"$@"}; }
RUNNING_BSH=
-# -help and -version only work if they are the only options. Therefore,
-# we cannot give the "-name xdvi" parameter in that case.
-# SU: Actually, with current xdvik, they should work in any position; but
-# we may keep this for compatibility with older versions and non-k xdvi.
+# -help and -version only used to work if they were the only options,
+# so the "-name xdvi" parameter wasn't used in that case. With current
+# xdvik, it should work in any case, but we keep this logic for compatibility
+# with older xdvik and plain xdvi versions.
+have_basename=`basename foo/bar 2>&1 | grep -i 'not found'`
+if [ "$have_basename"xxx = "xxx" ]; then
+ BASE_NAME=`basename $0`
+else
+ BASE_NAME=`echo $0 | sed 's!.*/!!'`
+fi
+
case "$#:$1" in
1:-help|1:-version)
NAMEOPT=;;
*)
- NAMEOPT='-name xdvi';;
+ NAMEOPT="-name $BASE_NAME";;
esac
xdviappfile=`kpsewhich -progname=xdvi --format='other text files' XDvi`
@@ -43,4 +50,4 @@ if test -n "$xdviappfile"; then
XFILESEARCHPATH="$xdviapppath:${XFILESEARCHPATH-%D}"; export XFILESEARCHPATH
fi
-exec xdvi-xaw.bin $NAMEOPT ${1+"$@"}
+exec xdvi-xaw $NAMEOPT ${1+"$@"}