mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-26 13:23:05 +07:00
Fetch homebrew taps manually
This commit is contained in:
parent
ea8be20255
commit
569522d50d
@ -43,7 +43,14 @@ add_pecl_extension() {
|
||||
add_brew_tap() {
|
||||
tap=$1
|
||||
if ! [ -d "$tap_dir/$tap" ]; then
|
||||
brew tap --shallow "$tap" >/dev/null 2>&1
|
||||
tap_user=$(dirname "$tap")
|
||||
tap_name=$(basename "$tap")
|
||||
get -s -n "" "https://github.com/$tap/archive/master.tar.gz" | tar -xzf - -C "$tap_dir/$tap_user" >/dev/null 2>&1
|
||||
if [ -d "$tap_dir/$tap_user/$tap_name-master" ]; then
|
||||
sudo mv "$tap_dir/$tap_user/$tap_name-master" "$tap_dir/$tap_user/$tap_name"
|
||||
else
|
||||
brew tap --shallow "$tap" >/dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user