Skip to content

Commit c8b64c3

Browse files
committed
use MACHTYPE variable for architecture selection (much easier)
1 parent c7c2f98 commit c8b64c3

File tree

1 file changed

+14
-22
lines changed

1 file changed

+14
-22
lines changed

texlive-arch.sh

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,18 @@
22

33
set -e
44

5-
system="$(uname -s)"
6-
machine="$(uname -m)"
7-
8-
case "$system" in
9-
MINGW*)
10-
arch=win32 ;;
11-
Darwin)
12-
[[ "$(sysctl -n hw.optional.x86_64)" == 1 ]] && arch=x86_64-darwin || arch=universal-darwin ;;
13-
Linux)
14-
case "$machine" in
15-
x86_64) arch=x86_64-linux ;;
16-
i386|i686) arch=i386-linux ;;
17-
esac
18-
;;
5+
case "$MACHTYPE" in
6+
i[36]86-*-msys*)
7+
echo win32 ;;
8+
x86_64-*-darwin10.*)
9+
echo x86_64-darwin ;;
10+
i386-*-darwin*)
11+
echo universal-darwin ;;
12+
x86_64-*-linux*)
13+
echo x86_64-linux ;;
14+
i[36]86-*-linux*)
15+
echo i386-linux ;;
16+
*)
17+
echo "Could not determine native TeX Live architecture from system type $system and machine type $machine" >&2
18+
exit 1
1919
esac
20-
21-
if [[ -n "$arch" ]]
22-
then
23-
echo "$arch"
24-
else
25-
echo "Could not determine native TeX Live architecture from system type $system and machine type $machine" >&2
26-
exit 1
27-
fi

0 commit comments

Comments
 (0)