summaryrefslogtreecommitdiff
path: root/scripts/context/stubs/install
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2018-05-12 01:19:03 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2018-05-12 01:19:03 +0200
commit77e216e323271fb85d508b7206b13c980540b74b (patch)
tree5b4053c2bbe5190e28c0dce89653c7b13aea0642 /scripts/context/stubs/install
parentd817aef76ab8b606c02bd0636661b634b43a68a6 (diff)
downloadcontext-77e216e323271fb85d508b7206b13c980540b74b.tar.gz
2018-05-12 00:16:00
Diffstat (limited to 'scripts/context/stubs/install')
-rw-r--r--scripts/context/stubs/install/first-setup.sh22
1 files changed, 18 insertions, 4 deletions
diff --git a/scripts/context/stubs/install/first-setup.sh b/scripts/context/stubs/install/first-setup.sh
index 11af49233..71fe32c16 100644
--- a/scripts/context/stubs/install/first-setup.sh
+++ b/scripts/context/stubs/install/first-setup.sh
@@ -17,9 +17,23 @@ cpu=`uname -m`
case "$system" in
# linux
Linux)
+ if command -v ldd >/dev/null && ldd --version 2>&1 | grep -E '^musl' >/dev/null
+ then
+ libc=musl
+ else
+ libc=glibc
+ fi
case "$cpu" in
- i*86) platform="linux" ;;
- x86_64|ia64) platform="linux-64" ;;
+ i*86)
+ case "$libc" in
+ glibc) platform="linux" ;;
+ musl) platform="linuxmusl" ;;
+ esac ;;
+ x86_64|ia64)
+ case "$libc" in
+ glibc) platform="linux-64" ;;
+ musl) platform="linuxmusl-64" ;;
+ esac ;;
# a little bit of cheating with ppc64 (won't work on Gentoo)
ppc|ppc64) platform="linux-ppc" ;;
@@ -138,8 +152,8 @@ fi
# download or update the distribution
# you may remove the --context=beta switch if you want to use "current"
# you can use --engine=luatex if you want just mkiv
-env PATH="$PWD/bin:$CONTEXTROOT/texmf-$platform/bin:$PATH" \
-./bin/mtxrun --script ./bin/mtx-update.lua --force --update --make --context=beta --platform=$platform --texroot="$CONTEXTROOT" $@
+env PATH="$PWD/bin:$CONTEXTROOT/texmf-$platform/bin:$PATH" MTX_PLATFORM="$platform" \
+./bin/mtxrun --script ./bin/mtx-update.lua --force --update --make --context=beta --platform="$platform" --texroot="$CONTEXTROOT" $@
echo
echo "When you want to use context, you need to initialize the tree by typing:"