Created
March 6, 2024 20:06
-
-
Save gabrielbarros/833a6f573faeabeb77d2f742aac17879 to your computer and use it in GitHub Desktop.
Install and update Composer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euo pipefail | |
echo 'Installing Composer...' | |
if [ -f /usr/bin/php ]; then | |
curl -sS https://getcomposer.org/installer | php | |
sudo mv composer.phar /usr/local/bin/composer | |
else | |
echo 'Composer needs PHP in order to be installed' >&2 | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment