-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathppx
More file actions
executable file
·48 lines (44 loc) · 1.05 KB
/
Copy pathppx
File metadata and controls
executable file
·48 lines (44 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env sh
# Get the directory of the script to work from.
DIR=$(dirname "$0")
if [ -f "$DIR/src/_build/default/bin/bin.exe" ]; then
# Use the dev build
"$DIR/src/_build/default/bin/bin.exe" "$@"
exit $?
fi
OS=$(uname -s)
ARCH=$(uname -m)
case "$OS" in
Darwin)
case "$ARCH" in
x86_64|amd64)
"$DIR/ppx-osx-x64.exe" "$@"
;;
arm64|aarch64)
"$DIR/ppx-osx-arm64.exe" "$@"
;;
*)
echo "No release available for '$OS-$ARCH'"
exit 1
;;
esac
;;
Linux*)
case "$ARCH" in
x86_64|amd64)
"$DIR/ppx-linux-x64.exe" "$@"
;;
arm64|aarch64)
"$DIR/ppx-linux-arm64.exe" "$@"
;;
*)
echo "No release available for '$OS-$ARCH'"
exit 1
;;
esac
;;
*)
echo "No release available for '$OS'"
exit 1
;;
esac