File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -8,13 +8,22 @@ cd "${TEMP_PATH}" || exit
8
8
mkdir bin
9
9
10
10
WINDOWS_TARGET=zip
11
- LINUX_TARGET=linux.x86_64.tar.xz
12
- MACOS_TARGET=darwin.x86_64.tar.xz
13
11
12
+ # Get system architecture
13
+ ARCH=$( uname -m)
14
+ if [[ " ${ARCH} " == " arm64" || " ${ARCH} " == " aarch64" ]]; then
15
+ CPU_ARCH=" aarch64"
16
+ else
17
+ CPU_ARCH=" x86_64"
18
+ fi
19
+
20
+ # Set targets based on OS and architecture
14
21
if [[ $( uname -s) == " Linux" ]]; then
22
+ LINUX_TARGET=" linux.${CPU_ARCH} .tar.xz"
15
23
curl -sL " https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION} /shellcheck-v${SHELLCHECK_VERSION} .${LINUX_TARGET} " | tar -xJf -
16
24
cp " shellcheck-v$SHELLCHECK_VERSION /shellcheck" ./bin
17
25
elif [[ $( uname -s) == " Darwin" ]]; then
26
+ MACOS_TARGET=" darwin.${CPU_ARCH} .tar.xz"
18
27
curl -sL " https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION} /shellcheck-v${SHELLCHECK_VERSION} .${MACOS_TARGET} " | tar -xJf -
19
28
cp " shellcheck-v$SHELLCHECK_VERSION /shellcheck" ./bin
20
29
else
You can’t perform that action at this time.
0 commit comments