Skip to content

Commit

Permalink
Fix install script for SDK 5.0.2
Browse files Browse the repository at this point in the history
SDK 5.0.2 once again extracts into the ohos-sdk
directory, so we need to strip a component.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
  • Loading branch information
jschwe committed Jan 29, 2025
1 parent dd4f93c commit 10564ad
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions install_ohos_sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,12 @@ function download_and_extract_sdk() {
curl --fail -L -O "${DOWNLOAD_URL}.sha256"
fi

VERSION_MAJOR=${INPUT_VERSION%%.*}

if [[ "${OS}" == "mac" ]]; then
echo "$(cat "${OS_FILENAME}".sha256) ${OS_FILENAME}" | shasum -a 256 --check --status
tar -xf "${OS_FILENAME}" --strip-components=3
else
echo "$(cat "${OS_FILENAME}".sha256) ${OS_FILENAME}" | sha256sum --check --status
if (( VERSION_MAJOR >= 5 )); then
if [[ "${INPUT_VERSION}" == "5.0.0" || "${INPUT_VERSION}" == "5.0.1" ]]; then
tar -xf "${OS_FILENAME}"
else
tar -xf "${OS_FILENAME}" --strip-components=1
Expand Down

0 comments on commit 10564ad

Please sign in to comment.