composer.sh 907 B

123456789101112131415161718192021222324252627
  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. #
  13. # NOTE: if you decide to update the composer version, be sure to test ALL of the frameworks
  14. # that use composer, as some of them have been known to break on newer versions of composer.
  15. php composer-installer.php --install-dir=${COMPOSER_HOME} --version=1.0.0
  16. cd ..
  17. echo "export COMPOSER_HOME=${COMPOSER_HOME}" > $IROOT/composer.installed
  18. echo -e "php \$COMPOSER_HOME/composer.phar install --no-interaction --working-dir \$TROOT --no-progress --optimize-autoloader" >> $IROOT/composer.installed
  19. source $IROOT/composer.installed