summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-10-06 21:03:37 +0000
committerKarl Berry <karl@freefriends.org>2018-10-06 21:03:37 +0000
commit66c04c88b27c67042c8f1205adee8417867b3d38 (patch)
tree21d59c8cb59fa43c91a544d04bcf4051b51e3958 /Build
parent8468d42d6a37b14922df1733d45ac698ede5ff90 (diff)
tlcockpit now from ctan (6oct18)
git-svn-id: svn://tug.org/texlive/trunk@48846 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/tlcockpit/tlcockpit.sh18
1 files changed, 12 insertions, 6 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/tlcockpit/tlcockpit.sh b/Build/source/texk/texlive/linked_scripts/tlcockpit/tlcockpit.sh
index 734ffe54c3c..56333fb47b4 100755
--- a/Build/source/texk/texlive/linked_scripts/tlcockpit/tlcockpit.sh
+++ b/Build/source/texk/texlive/linked_scripts/tlcockpit/tlcockpit.sh
@@ -1,10 +1,16 @@
#!/bin/sh
+# Public domain. Originally written by Norbert Preining and Karl Berry, 2018.
-kernel=`uname -s`
-if test "${kernel#*CYGWIN}" != "$kernel"
-then
- jarpath=`cygpath -w $(kpsewhich --progname=tlcockpit --format=texmfscripts tlcockpit.jar)`
-else
- jarpath=`kpsewhich --progname=tlcockpit --format=texmfscripts tlcockpit.jar`
+scriptname=`basename "$0"`
+jar="$scriptname.jar"
+jarpath=`kpsewhich --progname="$scriptname" --format=texmfscripts "$jar"`
+
+kernel=`uname -s 2>/dev/null`
+if echo "$kernel" | grep CYGWIN >/dev/null; then
+ CYGWIN_ROOT=`cygpath -w /`
+ export CYGWIN_ROOT
+ jarpath=`cygpath -w "$jarpath"`
fi
+
exec java -jar "$jarpath" "$@"
+