summarylogtreecommitdiffstats
path: root/context-setup-env.sh
diff options
context:
space:
mode:
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 00000000000..e8367f18fb5
--- /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
+