summarylogtreecommitdiffstats
path: root/context-setup-env.sh
diff options
context:
space:
mode:
authorPhilipp Gesang2016-09-08 23:49:43 +0200
committerPhilipp Gesang2016-09-08 23:49:43 +0200
commit568871533efdd40a791b5ced54384c0b5ad00a38 (patch)
tree89543345e7d900829343fb94f73245236b0851b6 /context-setup-env.sh
downloadaur-568871533efdd40a791b5ced54384c0b5ad00a38.tar.gz
initial: PKGBUILD, .SRCINFO, wrappers
Diffstat (limited to 'context-setup-env.sh')
-rw-r--r--context-setup-env.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/context-setup-env.sh b/context-setup-env.sh
new file mode 100644
index 000000000000..e8367f18fb5a
--- /dev/null
+++ b/context-setup-env.sh
@@ -0,0 +1,22 @@
+# Context executable wrapper
+declare -r context_root=/usr/share/texmf
+declare font_dirs=""
+if [[ -d "${HOME}/.fonts" ]]; then
+ declare font_dirs+="${HOME}/.fonts"
+fi
+if [[ -d /usr/share/fonts ]]; then
+ [[ -n "${font_dirs}" ]] && declare font_dirs+=";"
+ declare font_dirs+=/usr/share/fonts
+fi
+
+declare -x OSFONTDIR="${font_dirs:-}"
+declare -x TEXMF="{${context_root},${HOME}/.texmf}"
+declare -x TEXMFCACHE=${HOME}/.texmf/texmf-cache
+declare -x TEXMFCNF=${context_root}/texmf/web2c
+# “platform” mingles architecture and OS so we neutralize it
+# to mean just the latter; that’s where the binaries go anyways.
+declare -x TEXOS=texmf-linux
+declare -x MTX_PLATFORM=linux
+
+# vim:et:ft=sh:sw=2:ts=8
+