Skip to content

Instantly share code, notes, and snippets.

@INDIAN2020
Created July 9, 2024 06:45
Show Gist options
  • Save INDIAN2020/2c631b4738c5a59a9c74a017c94ebcda to your computer and use it in GitHub Desktop.
Save INDIAN2020/2c631b4738c5a59a9c74a017c94ebcda to your computer and use it in GitHub Desktop.
helpers
# Install latest composer
cd ~
curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php
HASH=`curl -sS https://composer.github.io/installer.sig`
php -r "if (hash_file('SHA384', '/tmp/composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
# If the output says "Installer corrupt", you’ll need to repeat the download and verification process until you have a verified installer.
sudo php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment