diff options
Diffstat (limited to 'Master/texmf-dist/scripts/bib2gls/convertgls2bib.sh')
-rwxr-xr-x | Master/texmf-dist/scripts/bib2gls/convertgls2bib.sh | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/Master/texmf-dist/scripts/bib2gls/convertgls2bib.sh b/Master/texmf-dist/scripts/bib2gls/convertgls2bib.sh index 3e7370b0ca7..f237f505d5c 100755 --- a/Master/texmf-dist/scripts/bib2gls/convertgls2bib.sh +++ b/Master/texmf-dist/scripts/bib2gls/convertgls2bib.sh @@ -1,12 +1,15 @@ #!/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=convertgls2bib --format=texmfscripts convertgls2bib.jar)` -else - jarpath=`kpsewhich --progname=convertgls2bib --format=texmfscripts convertgls2bib.jar` -fi +scriptname=`basename "$0" .sh` +jar="$scriptname.jar" +jarpath=`kpsewhich --progname="$scriptname" --format=texmfscripts "$jar"` -java -jar "$jarpath" "$@" +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" "$@" |