composer.sh 704 B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. RETCODE=$(fw_exists ${IROOT}/composer.installed)
  3. [ ! "$RETCODE" == 0 ] || { \
  4. source $IROOT/composer.installed
  5. return 0; }
  6. COMPOSER_HOME=$IROOT/php-composer
  7. mkdir -p $COMPOSER_HOME
  8. cd $COMPOSER_HOME
  9. fw_get -o composer-installer.php https://getcomposer.org/installer
  10. # Use the PHP and composer from our PHP_HOME directory and
  11. # COMPOSER_HOME directories
  12. php composer-installer.php --install-dir=${COMPOSER_HOME}
  13. cd ..
  14. echo "export COMPOSER_HOME=${COMPOSER_HOME}" > $IROOT/composer.installed
  15. echo -e "php \$COMPOSER_HOME/composer.phar install --no-interaction --working-dir \$TROOT --no-progress --optimize-autoloader" >> $IROOT/composer.installed
  16. source $IROOT/composer.installed