fix: make symfony-cli installation faster on linux

This commit is contained in:
Louis-Marie Michelin 2022-09-01 18:20:00 +02:00
parent e04e1d97f0
commit 45410ae8f0

View File

@ -1,11 +1,11 @@
add_symfony_helper() { add_symfony_helper() {
if command -v brew >/dev/null; then if [ "$(uname -s)" = "Linux" ]; then
add_brew_tap symfony-cli/homebrew-tap
brew install symfony-cli/tap/symfony-cli
else
arch=$(dpkg --print-architecture) arch=$(dpkg --print-architecture)
get -s -n "" "https://github.com/symfony-cli/symfony-cli/releases/latest/download/symfony-cli_linux_$arch.tar.gz" | sudo tar -xz -C "${tool_path_dir:?}" get -s -n "" "https://github.com/symfony-cli/symfony-cli/releases/latest/download/symfony-cli_linux_$arch.tar.gz" | sudo tar -xz -C "${tool_path_dir:?}"
sudo chmod a+x /usr/local/bin/symfony sudo chmod a+x /usr/local/bin/symfony
elif [ "$(uname -s)" = "Darwin" ]; then
add_brew_tap symfony-cli/homebrew-tap
brew install symfony-cli/tap/symfony-cli
fi fi
} }