summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/bib2gls/bib2gls.sh
blob: 2e720ffb545452af420a2d25a8502b78e2d87c32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
# Adapted from tlcockpit.sh to ensure the script works with cygwin

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

# 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