fix: android check platform

pull/227/head
zijiren233 2 years ago
parent 9c9487a33a
commit 530fda45a9

@ -546,16 +546,15 @@ function initDefaultCGODeps() {
esac esac
;; ;;
"android") "android")
if [[ "${GOHOSTOS}" == "windows" ]] && [[ "${GOHOSTARCH}" != "amd64" ]]; then case "${GOHOSTOS}" in
echo -e "${COLOR_LIGHT_RED}CGO is disabled for android/${goarch}${micro:+"/$micro"}.${COLOR_RESET}" "windows" | "linux")
return 1 [[ "${GOHOSTARCH}" != "amd64" ]] && echo -e "${COLOR_LIGHT_RED}CGO is disabled for android/${goarch}${micro:+"/$micro"}.${COLOR_RESET}" && return 1
elif [[ "${GOHOSTOS}" == "linux" ]] && [[ "${GOHOSTARCH}" != "amd64" ]]; then ;;
echo -e "${COLOR_LIGHT_RED}CGO is disabled for android/${goarch}${micro:+"/$micro"}.${COLOR_RESET}" "darwin") ;;
return 1 *)
elif [[ "${GOHOSTOS}" != "darwin" ]]; then echo -e "${COLOR_LIGHT_RED}CGO is disabled for android/${goarch}${micro:+"/$micro"}.${COLOR_RESET}" && return 1
echo -e "${COLOR_LIGHT_RED}CGO is disabled for android/${goarch}${micro:+"/$micro"}.${COLOR_RESET}" ;;
return 1 esac
fi
initAndroidNDK "${goarch}" "${micro}" initAndroidNDK "${goarch}" "${micro}"
;; ;;
*) *)

Loading…
Cancel
Save