Browse Source

Update composer install and update yii2 install.sh to work with it

Lita Gratrix 10 years ago
parent
commit
ddcdc0d626
2 changed files with 9 additions and 4 deletions
  1. 2 1
      frameworks/PHP/Yii2/install.sh
  2. 7 3
      toolset/setup/linux/systools/composer.sh

+ 2 - 1
frameworks/PHP/Yii2/install.sh

@@ -2,7 +2,8 @@
 
 
 fw_depends php nginx composer
 fw_depends php nginx composer
 
 
+export COMPOSER_HOME=${IROOT}/php-composer
 PHP_HOME=${IROOT}/php-5.5.17
 PHP_HOME=${IROOT}/php-5.5.17
-${PHP_HOME}/bin/php $IROOT/composer.phar install \
+${PHP_HOME}/bin/php $COMPOSER_HOME/composer.phar install \
   --no-interaction --working-dir $TROOT \
   --no-interaction --working-dir $TROOT \
   --no-progress --optimize-autoloader 
   --no-progress --optimize-autoloader 

+ 7 - 3
toolset/setup/linux/systools/composer.sh

@@ -8,8 +8,12 @@ fw_get https://getcomposer.org/installer -O composer-installer.php
 
 
 mkdir -p php-composer
 mkdir -p php-composer
 
 
-# Use the PHP from our IROOT directory
-PHP_HOME=${IROOT}/php-5.5.17
-${PHP_HOME}/bin/php composer-installer.php --install-dir=$IROOT
+cd php-composer
 
 
+# Use the PHP and composer from our PHP_HOME directory and 
+# COMPOSER_HOME directories (should be specified in frameworks 
+# install.sh file)
+${PHP_HOME}/bin/php composer-installer.php --install-dir=${COMPOSER_HOME}
+
+cd ..
 touch ${IROOT}/php-composer.installed
 touch ${IROOT}/php-composer.installed