summaryrefslogtreecommitdiff
path: root/Build/source/texk/texlive/linked_scripts/texplate/texplate.sh
blob: da6497803784ff7bf761e01d8fc4c0c8876acc8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh
# Public domain. Originally written by Norbert Preining and Karl Berry, 2018.
# Note from Paulo: this script provides better Cygwin support than our original
# approach, so the team decided to use it as a proper wrapper for texplate as well.

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" "$@"