[ubuntu] Cleanup bash scripts (#9076)

* [ubuntu] Cleanup bash scripts

* Fix ms-repos lsb_release

* Fix install-bicep url

* Fix install-nvm
This commit is contained in:
Shamil Mubarakshin
2023-12-29 12:36:27 +01:00
committed by GitHub
parent e16b5524ff
commit 1658c2e905
56 changed files with 274 additions and 246 deletions
+5 -4
View File
@@ -9,14 +9,15 @@
source $HELPER_SCRIPTS/install.sh
# Download yq
base_url="https://github.com/mikefarah/yq/releases/latest/download"
binary_path=$(download_with_retry "${base_url}/yq_linux_amd64")
yq_url=$(resolve_github_release_asset_url "mikefarah/yq" "endswith(\"yq_linux_amd64\")" "latest")
binary_path=$(download_with_retry "${yq_url}")
# Supply chain security - yq
external_hash=$(get_checksum_from_url "${base_url}/checksums" "yq_linux_amd64 " "SHA256" "true" " " "19")
hash_url=$(resolve_github_release_asset_url "mikefarah/yq" "endswith(\"checksums\")" "latest")
external_hash=$(get_checksum_from_url "${hash_url}" "yq_linux_amd64 " "SHA256" "true" " " "19")
use_checksum_comparison "$binary_path" "$external_hash"
# Install yq
sudo install "$binary_path" /usr/bin/yq
install "$binary_path" /usr/bin/yq
invoke_tests "Tools" "yq"