diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /support/tlcockpit/scripts |
Initial commit
Diffstat (limited to 'support/tlcockpit/scripts')
-rwxr-xr-x | support/tlcockpit/scripts/tlcockpit.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/support/tlcockpit/scripts/tlcockpit.sh b/support/tlcockpit/scripts/tlcockpit.sh new file mode 100755 index 0000000000..1b2e8d9cb0 --- /dev/null +++ b/support/tlcockpit/scripts/tlcockpit.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# Public domain. Originally written by Norbert Preining and Karl Berry, 2018-2019. + +scriptname=`basename "$0"` +javaVersion=$(java -version 2>&1 | head -1) +case "$javaVersion" in + *"1.8"*) jar="$scriptname-jdk8".jar ;; + *) jar="$scriptname.jar" ;; +esac +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" "$@" + |