diff --git a/images/linux/scripts/installers/android.sh b/images/linux/scripts/installers/android.sh index 73611e66..ed06f51a 100644 --- a/images/linux/scripts/installers/android.sh +++ b/images/linux/scripts/installers/android.sh @@ -42,12 +42,12 @@ else exit 1 fi -toolsetJson="$INSTALLER_SCRIPT_FOLDER/toolset.json" -platforms=$(cat $toolsetJson | jq -r '.android.platform_list[]|"platforms;" + .') -buildtools=$(cat $toolsetJson | jq -r '.android.build_tools[]|"build-tools;" + .') -extras=$(cat $toolsetJson | jq -r '.android.extra_list[]|"extras;" + .') -addons=$(cat $toolsetJson | jq -r '.android.addon_list[]|"add-ons;" + .') -additional=$(cat $toolsetJson | jq -r '.android.additional_tools[]') +toolset="$INSTALLER_SCRIPT_FOLDER/toolset.json" +platforms=$(jq -r '.android.platform_list[]|"platforms;" + .' $toolset) +buildtools=$(jq -r '.android.build_tools[]|"build-tools;" + .' $toolset) +extras=$(jq -r '.android.extra_list[]|"extras;" + .' $toolset) +addons=$(jq -r '.android.addon_list[]|"add-ons;" + .' $toolset) +additional=$(jq -r '.android.additional_tools[]' $toolset) # Install the following SDKs and build tools, passing in "y" to accept licenses. echo "y" | ${ANDROID_SDK_ROOT}/tools/bin/sdkmanager $platforms $buildtools $extras $google_api_list $addons $additional diff --git a/images/linux/scripts/installers/azpowershell.sh b/images/linux/scripts/installers/azpowershell.sh index 082ab185..2b7d703d 100644 --- a/images/linux/scripts/installers/azpowershell.sh +++ b/images/linux/scripts/installers/azpowershell.sh @@ -12,8 +12,8 @@ source $HELPER_SCRIPTS/os.sh if isUbuntu20 ; then versions=$(pwsh -Command '(Find-Module -Name Az).Version') else - toolsetJson="$INSTALLER_SCRIPT_FOLDER/toolset.json" - versions=$(cat $toolsetJson | jq -r '.azureModules[] | select(.name | contains("az")) | .versions[]') + toolset="$INSTALLER_SCRIPT_FOLDER/toolset.json" + versions=$(jq -r '.azureModules[] | select(.name | contains("az")) | .versions[]' $toolset) fi # Install Azure CLI (instructions taken from https://docs.microsoft.com/en-us/cli/azure/install-azure-cli) diff --git a/images/linux/scripts/installers/basic.sh b/images/linux/scripts/installers/basic.sh index d216bffb..0772cf4e 100644 --- a/images/linux/scripts/installers/basic.sh +++ b/images/linux/scripts/installers/basic.sh @@ -8,9 +8,9 @@ set -e # Source the helpers for use with the script source $HELPER_SCRIPTS/document.sh -toolsetJson="$INSTALLER_SCRIPT_FOLDER/toolset.json" -common_packages=$(jq -r ".apt.common_packages[]" $toolsetJson) -cmd_packages=$(jq -r ".apt.cmd_packages[]" $toolsetJson) +toolset="$INSTALLER_SCRIPT_FOLDER/toolset.json" +common_packages=$(jq -r ".apt.common_packages[]" $toolset) +cmd_packages=$(jq -r ".apt.cmd_packages[]" $toolset) for package in $common_packages $cmd_packages; do echo "Install $package" apt-get install -y --no-install-recommends $package