ansible-roles/composer/templates/composer-installer.j2

11 lines
511 B
Plaintext
Raw Normal View History

#!/bin/bash
php -r "copy('{{ composer_get_url }}', '{{ composer_setup }}');"
php -r "if (hash_file('{{ composer_signature_type }}', '{{ composer_setup }}') === '{{ composer_signature }}') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('{{ composer_setup }}'); } echo PHP_EOL;"
php {{ composer_setup }} --install-dir={{ composer_dest_dir }} --filename={{ composer_exec_name }}
php -r "unlink('{{ composer_setup }}');"
chmod 755 {{ composer_dest_dir }}/{{ composer_exec_name }}
exit 0