From 6670f257078b416ca4a737f9fa2cc5fe3eb6bdcb Mon Sep 17 00:00:00 2001 From: Jonathan Schwender Date: Sun, 6 Oct 2024 14:30:49 +0200 Subject: [PATCH] Ignore archive name Strip off the first part, so we can ignore the upstream folder name. Signed-off-by: Jonathan Schwender --- install_ohos_sdk.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/install_ohos_sdk.sh b/install_ohos_sdk.sh index 78f5888..f872644 100755 --- a/install_ohos_sdk.sh +++ b/install_ohos_sdk.sh @@ -64,13 +64,12 @@ fi if [[ "${OS}" == "mac" ]]; then echo "$(cat "${OS_FILENAME}".sha256) ${OS_FILENAME}" | shasum -a 256 --check --status - tar -xf "${OS_FILENAME}" --strip-components=2 + tar -xf "${OS_FILENAME}" --strip-components=3 else echo "$(cat "${OS_FILENAME}".sha256) ${OS_FILENAME}" | sha256sum --check --status - tar -xf "${OS_FILENAME}" + tar -xf "${OS_FILENAME}" --strip-components=1 fi rm "${OS_FILENAME}" "${OS_FILENAME}.sha256" -cd ohos-sdk* echo "sdk-path=$PWD" >> "${GITHUB_OUTPUT}" if [[ "${OS}" == "linux" ]]; then