Files
monica/scripts/docker/install-composer.sh
T
Alexis Saettler 851ba981f6 Docker run real cron (#906)
* Use crontab for schedules
* Update apache conf file
* Clean composer cache after installation
* Clean apk cache after installation
2018-02-22 22:27:36 +01:00

22 lines
467 B
Bash
Executable File

#!/bin/sh
SETUP=composer-setup.php
cd /tmp
EXPECTED_SIGNATURE=$(curl -sS https://composer.github.io/installer.sig)
curl -sS -o $SETUP https://getcomposer.org/installer
ACTUAL_SIGNATURE=$(openssl sha384 $SETUP | cut -d' ' -f2)
if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]
then
>&2 echo 'ERROR: Invalid installer signature'
rm $SETUP
exit 1
fi
php $SETUP --quiet --install-dir=/usr/local/bin --filename=composer
RESULT=$?
rm $SETUP
exit $RESULT