diff options
author | M.Gergo | 2021-05-17 17:50:05 +0200 |
---|---|---|
committer | M.Gergo | 2021-05-17 17:50:05 +0200 |
commit | ef8b3fd973fa34b303370d5acc21744e57bca507 (patch) | |
tree | 67a42f55b0f36f024c33d8892c1112e8c5746556 /mayor-orig/mayor-base/bin/install-composer.sh | |
parent | fb24a50c54d5776468e49def08aea44c4077eb47 (diff) | |
download | mayor-rev4787.tar.gz mayor-rev4787.zip |
Rev: 4787rev4787
Diffstat (limited to 'mayor-orig/mayor-base/bin/install-composer.sh')
-rwxr-xr-x | mayor-orig/mayor-base/bin/install-composer.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/mayor-orig/mayor-base/bin/install-composer.sh b/mayor-orig/mayor-base/bin/install-composer.sh new file mode 100755 index 00000000..a61aff80 --- /dev/null +++ b/mayor-orig/mayor-base/bin/install-composer.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')" +php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" +ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" + +if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ] +then + >&2 echo 'ERROR: Invalid installer checksum' + rm composer-setup.php + exit 1 +fi + +php composer-setup.php --quiet +RESULT=$? +rm composer-setup.php +exit $RESULT |