diff --git a/install_ohos_sdk.sh b/install_ohos_sdk.sh index 78b80c3..a0d922c 100755 --- a/install_ohos_sdk.sh +++ b/install_ohos_sdk.sh @@ -50,14 +50,14 @@ else fi IFS=";" read -ra COMPONENTS <<< "${INPUT_COMPONENTS}" -for COMPONENT in ${COMPONENTS[@]} +for COMPONENT in "${COMPONENTS[@]}" do echo "Extracting component ${COMPONENT}" - unzip ${COMPONENT}-*.zip - API_VERSION=$(cat ${COMPONENT}/oh-uni-package.json | jq -r '.apiVersion') + unzip "${COMPONENT}"-*.zip + API_VERSION=$(cat "${COMPONENT}/oh-uni-package.json" | jq -r '.apiVersion') if [ "$INPUT_FIXUP_PATH" = "true" ]; then - mkdir -p ${API_VERSION} - mv ${COMPONENT} "${API_VERSION}/" + mkdir -p "${API_VERSION}" + mv "${COMPONENT}" "${API_VERSION}/" fi done rm ./*.zip