Browse Source

remove bash_profile.sh and update install.sh for php-silex

Lita Gratrix 10 years ago
parent
commit
f3b35fdfac

+ 0 - 9
frameworks/PHP/php-silex/bash_profile.sh

@@ -1,9 +0,0 @@
-#!/bin/bash
-
-export PHP_HOME=${IROOT}/php-5.5.17
-
-export PHP_FPM=$PHP_HOME/sbin/php-fpm
-
-export COMPOSER_HOME=${IROOT}/php-composer
-
-export NGINX_HOME=${IROOT}/nginx

+ 10 - 1
frameworks/PHP/php-silex/install.sh

@@ -1,3 +1,12 @@
 #!/bin/bash
 #!/bin/bash
 
 
-fw_depends php composer nginx
+export PHP_HOME=${IROOT}/php-5.5.17
+export COMPOSER_HOME=${IROOT}/php-composer
+export PHP_FPM=${PHP_HOME}/sbin/php-fpm
+export NGINX_HOME=${IROOT}/nginx
+
+fw_depends php nginx composer
+
+${PHP_HOME}/bin/php ${COMPOSER_HOME}/composer.phar install \
+  --no-interaction --working-dir $TROOT \
+  --no-progress --optimize-autoloader 

+ 4 - 1
frameworks/PHP/php-silex/setup.sh

@@ -1,4 +1,8 @@
 #!/bin/bash
 #!/bin/bash
+export PHP_HOME=${IROOT}/php-5.5.17
+export PHP_FPM=$PHP_HOME/sbin/php-fpm
+export COMPOSER_HOME=${IROOT}/php-composer
+export NGINX_HOME=${IROOT}/nginx
 
 
 sed -i 's|localhost|'"${DBHOST}"'|g' web/index.php
 sed -i 's|localhost|'"${DBHOST}"'|g' web/index.php
 sed -i 's|".*\FrameworkBenchmarks/php-silex|"'"${TROOT}"'|g' deploy/php-silex
 sed -i 's|".*\FrameworkBenchmarks/php-silex|"'"${TROOT}"'|g' deploy/php-silex
@@ -10,6 +14,5 @@ PHP_HOME=${IROOT}/php-5.5.17
 
 
 export PATH="$COMPOSER_HOME:$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
 export PATH="$COMPOSER_HOME:$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
 
 
-${PHP_HOME}/bin/php ${IROOT}/composer.phar install --optimize-autoloader
 $PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
 $PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
 $NGINX_HOME/sbin/nginx -c $TROOT/deploy/nginx.conf
 $NGINX_HOME/sbin/nginx -c $TROOT/deploy/nginx.conf

+ 4 - 1
frameworks/PHP/php-silex/setup_raw.sh

@@ -1,4 +1,8 @@
 #!/bin/bash
 #!/bin/bash
+export PHP_HOME=${IROOT}/php-5.5.17
+export PHP_FPM=$PHP_HOME/sbin/php-fpm
+export COMPOSER_HOME=${IROOT}/php-composer
+export NGINX_HOME=${IROOT}/nginx
 
 
 sed -i 's|localhost|'"${DBHOST}"'|g' web/index_raw.php
 sed -i 's|localhost|'"${DBHOST}"'|g' web/index_raw.php
 sed -i 's|".*\FrameworkBenchmarks/php-silex|"'"${TROOT}"'|g' deploy/php-silex
 sed -i 's|".*\FrameworkBenchmarks/php-silex|"'"${TROOT}"'|g' deploy/php-silex
@@ -10,6 +14,5 @@ PHP_HOME=${IROOT}/php-5.5.17
 
 
 export PATH="$COMPOSER_HOME:$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
 export PATH="$COMPOSER_HOME:$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
 
 
-${PHP_HOME}/bin/php ${IROOT}/composer.phar install --optimize-autoloader
 $PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
 $PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
 $NGINX_HOME/sbin/nginx -c $TROOT/deploy/nginx_raw.conf
 $NGINX_HOME/sbin/nginx -c $TROOT/deploy/nginx_raw.conf