File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,39 +13,27 @@ BIN="operator-sdk"
1313BIN_ARCH=" ${BIN} _${GOOS} _${GOARCH} "
1414OPERATOR_SDK_DL_URL=" https://github.com/operator-framework/operator-sdk/releases/download/v${VERSION} "
1515
16- case ${GOOS} in
17- linux)
18- CHECKSUM=" 9596b2894b4b1d7f1c3b54cb1ec317b86494dbc00718b48561dfbcb232477c26"
19- ;;
20- darwin)
21- CHECKSUM=" bb54842b92efee4ea1071373f7482b62a8130cc3dc4d45a5be50041ae7c81e7c"
22- ;;
23- * )
24- echo " Unsupported OS $GOOS "
25- exit 1
26- ;;
27- esac
28-
29- if [ " $GOARCH " != " amd64" ]; then
16+ if [[ " $GOOS " != " linux" && " $GOOS " != " darwin" ]]; then
17+ echo " Unsupported OS $GOOS "
18+ exit 1
19+ fi
20+
21+ if [[ " $GOARCH " != " amd64" && " $GOARCH " != " arm64" && " $GOARCH " != " ppc64le" && " $GOARCH " != " s390x" ]]; then
3022 echo " Unsupported architecture $GOARCH "
3123 exit 1
3224fi
3325
3426command -v curl & > /dev/null || { echo " can't find curl command" && exit 1; }
35- command -v sha256sum & > /dev/null || { echo " can't find sha256sum command" && exit 1; }
3627
3728TEMPDIR=$( mktemp -d)
3829BIN_PATH=" ${TEMPDIR} /${BIN_ARCH} "
3930
4031echo " > downloading binary"
4132curl --silent --location -o " ${BIN_PATH} " " ${OPERATOR_SDK_DL_URL} /operator-sdk_${GOOS} _${GOARCH} "
4233
43- if [ " ${VERIFY} " == " yes" ]; then
44- echo " > verifying binary"
45- echo " ${CHECKSUM} ${BIN_PATH} " | sha256sum -c --quiet
46- fi
47-
4834echo " > installing binary"
4935mv " ${BIN_PATH} " " ${OUTPUT_PATH} "
5036chmod +x " ${OUTPUT_PATH} "
5137rm -rf " ${TEMPDIR} "
38+
39+ echo " > operator-sdk binary available at ${OUTPUT_PATH} "
You can’t perform that action at this time.
0 commit comments