File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 77# sudo is required to copy binary to INSTALL_DIR for linux
88: " ${USE_SUDO:= false} "
99
10+ # Target architecture (optional, defaults to auto-detect)
11+ : " ${ARCH:= } "
12+
1013# Http request CLI
1114HTTP_REQUEST_CLI=curl
1215
@@ -20,7 +23,9 @@ CLI_FILENAME=clusteradm
2023CLI_FILE=" ${INSTALL_DIR} /${CLI_FILENAME} "
2124
2225getSystemInfo () {
23- ARCH=$( uname -m)
26+ if [ -z " $ARCH " ]; then
27+ ARCH=$( uname -m)
28+ fi
2429 case $ARCH in
2530 armv7* ) ARCH=" arm" ;;
2631 aarch64) ARCH=" arm64" ;;
@@ -37,16 +42,16 @@ getSystemInfo() {
3742
3843verifySupported () {
3944 local supported=(darwin-amd64 darwin-arm64 linux-amd64 linux-arm64 windows-amd64)
40- local current_osarch =" ${OS} -${ARCH} "
45+ local target_osarch =" ${OS} -${ARCH} "
4146
4247 for osarch in " ${supported[@]} " ; do
43- if [ " $osarch " == " $current_osarch " ]; then
44- echo " Your system is ${OS} _${ARCH} "
48+ if [ " $osarch " == " $target_osarch " ]; then
49+ echo " Installing clusteradm for ${OS} _${ARCH} "
4550 return
4651 fi
4752 done
4853
49- echo " No prebuilt binary for ${current_osarch } "
54+ echo " No prebuilt binary for ${target_osarch } "
5055 exit 1
5156}
5257
You can’t perform that action at this time.
0 commit comments