diff options
author | Karl Berry <karl@freefriends.org> | 2018-12-01 22:46:56 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-12-01 22:46:56 +0000 |
commit | 6a8c1f1989f77d1cbfb63c938b9a9ad0093803ce (patch) | |
tree | bfc9a3cce2dd23070a3f8a93a598b639c0db8d0c /Build | |
parent | 222983be38ba4303d38271934e2d248bae9d1e18 (diff) |
bib2gls (1dec18)
git-svn-id: svn://tug.org/texlive/trunk@49293 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rwxr-xr-x | Build/source/texk/texlive/linked_scripts/bib2gls/bib2gls.sh | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/bib2gls/bib2gls.sh b/Build/source/texk/texlive/linked_scripts/bib2gls/bib2gls.sh index 124091e7f3b..2e720ffb545 100755 --- a/Build/source/texk/texlive/linked_scripts/bib2gls/bib2gls.sh +++ b/Build/source/texk/texlive/linked_scripts/bib2gls/bib2gls.sh @@ -1,12 +1,22 @@ #!/bin/sh +# Adapted from tlcockpit.sh to ensure the script works with cygwin -kernel=`uname -s` -if test "${kernel#*CYGWIN}" != "$kernel" -then - jarpath=`cygpath -w $(kpsewhich --progname=bib2gls --format=texmfscripts bib2gls.jar)` -else - jarpath=`kpsewhich --progname=bib2gls --format=texmfscripts bib2gls.jar` +scriptname=`basename "$0" .sh` +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 -java -Djava.locale.providers=CLDR,JRE,SPI -jar "$jarpath" "$@" +# User may have globally set their locale provider preference in +# $JAVA_TOOL_OPTIONS so don't override it. +if [ -z "$JAVA_TOOL_OPTIONS" ]; then + exec java -Djava.locale.providers=CLDR,JRE,SPI -jar "$jarpath" "$@" +else + exec java -jar "$jarpath" "$@" +fi |