Skip to content

Instantly share code, notes, and snippets.

@INDIAN2020
Created July 9, 2024 06:45
Show Gist options
  • Select an option

  • Save INDIAN2020/2c631b4738c5a59a9c74a017c94ebcda to your computer and use it in GitHub Desktop.

Select an option

Save INDIAN2020/2c631b4738c5a59a9c74a017c94ebcda to your computer and use it in GitHub Desktop.

Revisions

  1. INDIAN2020 created this gist Jul 9, 2024.
    8 changes: 8 additions & 0 deletions helpers.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    # 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