-
Notifications
You must be signed in to change notification settings - Fork 432
Expand file tree
/
Copy pathutils.sh
More file actions
33 lines (29 loc) · 1.01 KB
/
utils.sh
File metadata and controls
33 lines (29 loc) · 1.01 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
# DENOFILES is only required at configure.sh, but DENO_ARCH_DIR is used in many places
if [[ $OSTYPE == 'darwin'* ]]; then
DENOURL=https://github.com/denoland/deno/releases/download
FULLARCH=$(uname -sm)
if [[ $FULLARCH == "Darwin x86_64" ]]; then
DENO_ARCH_DIR=x86_64
DENOFILES="deno-x86_64-apple-darwin.zip"
elif [[ $FULLARCH == "Darwin arm64" ]]; then
DENO_ARCH_DIR=aarch64
DENOFILES="deno-aarch64-apple-darwin.zip"
else
echo "configure script failed: unrecognized architecture " ${FULLARCH}
exit 1
fi
else
NIXARCH=$(uname -m)
if [[ $NIXARCH == "x86_64" ]]; then
DENOURL=https://github.com/denoland/deno/releases/download
DENOFILES=deno-x86_64-unknown-linux-gnu.zip
DENO_ARCH_DIR=x86_64
elif [[ $NIXARCH == "aarch64" ]]; then
DENOURL=https://github.com/denoland/deno/releases/download
DENOFILES=deno-aarch64-unknown-linux-gnu.zip
DENO_ARCH_DIR=aarch64
else
echo "configure script failed: unrecognized architecture " ${NIXARCH}
exit 1
fi
fi