summaryrefslogtreecommitdiff
path: root/Master/bin/sparc-solaris/xdvi
diff options
context:
space:
mode:
authorVladimir Volovich <vvv@vsu.ru>2008-07-13 01:32:04 +0000
committerVladimir Volovich <vvv@vsu.ru>2008-07-13 01:32:04 +0000
commit48a95d7bf16e33e1efb35a5d72a0f29a22f2a071 (patch)
tree347e174b405d8c7c14ef5b8f6d1b97701fb4094f /Master/bin/sparc-solaris/xdvi
parent4a7bfc2d0ff23e80d8ad3667c8ef24ad9fea8e55 (diff)
sparc-solaris and powerpc-aix binaries, from source r9499.
git-svn-id: svn://tug.org/texlive/trunk@9500 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/bin/sparc-solaris/xdvi')
-rwxr-xr-xMaster/bin/sparc-solaris/xdvi19
1 files changed, 13 insertions, 6 deletions
diff --git a/Master/bin/sparc-solaris/xdvi b/Master/bin/sparc-solaris/xdvi
index 847bf4acd69..04662a62d36 100755
--- a/Master/bin/sparc-solaris/xdvi
+++ b/Master/bin/sparc-solaris/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-motif.bin $NAMEOPT ${1+"$@"}
+exec xdvi-motif $NAMEOPT ${1+"$@"}