Skip to content

Commit f2bc04c

Browse files
committed
Fix install script for SDK 5.0.2
SDK 5.0.2 once again extracts into the ohos-sdk directory, so we need to strip a component. Signed-off-by: Jonathan Schwender <[email protected]>
1 parent 98f6027 commit f2bc04c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

install_ohos_sdk.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,12 @@ function download_and_extract_sdk() {
103103
curl --fail -L -O "${DOWNLOAD_URL}.sha256"
104104
fi
105105

106-
VERSION_MAJOR=${INPUT_VERSION%%.*}
107-
108106
if [[ "${OS}" == "mac" ]]; then
109107
echo "$(cat "${OS_FILENAME}".sha256) ${OS_FILENAME}" | shasum -a 256 --check --status
110108
tar -xf "${OS_FILENAME}" --strip-components=3
111109
else
112110
echo "$(cat "${OS_FILENAME}".sha256) ${OS_FILENAME}" | sha256sum --check --status
113-
if (( VERSION_MAJOR >= 5 )); then
111+
if [[ "${INPUT_VERSION}" == "5.0.0" || "${INPUT_VERSION}" == "5.0.1" ]]; then
114112
tar -xf "${OS_FILENAME}"
115113
else
116114
tar -xf "${OS_FILENAME}" --strip-components=1

0 commit comments

Comments
 (0)