mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
rework chrome installation
This commit is contained in:
@@ -96,4 +96,15 @@ get_default_xcode_from_toolset() {
|
||||
verlte() {
|
||||
sortedVersion=$(echo -e "$1\n$2" | sort -V | head -n1)
|
||||
[ "$1" = "$sortedVersion" ]
|
||||
}
|
||||
|
||||
brew_install_ignoring_sha256() {
|
||||
local TOOL_NAME=$1
|
||||
|
||||
CASK_DIR=/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks
|
||||
chmod a+w "$CASK_DIR/$TOOL_NAME.rb"
|
||||
SHA=$(grep "sha256" "$CASK_DIR/$TOOL_NAME.rb" | awk '{print $2}')
|
||||
sed -i '' "s/$SHA/:no_check/" "$CASK_DIR/$TOOL_NAME.rb"
|
||||
brew cask install $TOOL_NAME
|
||||
sed -i '' "s/:no_check/:$SHA/" "$CASK_DIR/$TOOL_NAME.rb"
|
||||
}
|
||||
Reference in New Issue
Block a user