Browse Source

Use FWROOT to improve bash ERR printing and installation files

Hamilton Turner 11 years ago
parent
commit
7020664675

+ 4 - 1
toolset/setup/linux/bash_functions.sh

@@ -34,8 +34,11 @@ fw_traperror () {
   IFS=':' read -a linestack <<< "$7" # Stack (line numbers)
   FW_dep_error=1
   FW_any_errors=1
+
+  wd=$(pwd)
+  relative_wd=\$FWROOT${wd#$FWROOT}
   
-  echo "ERROR: $(echo ${bashstack[1]#$FWROOT}): Command '$command' exited with status $err (dependency=$depend)"
+  echo "ERROR: $(echo ${bashstack[1]#$FWROOT}): Command '$command' exited with status $err (dependency=$depend) (cwd=$relative_wd)"
   #echo "  Function stack    : ${funcstack[@]}"
   #echo "  Bash source stack : ${bashstack[@]}"
   #echo "  Bash line stack   : ${linestack[@]}"

+ 1 - 1
toolset/setup/linux/languages/erlang.sh

@@ -3,7 +3,7 @@
 RETCODE=$(fw_exists /usr/bin/erl)
 [ ! "$RETCODE" == 0 ] || { return 0; }
 
-sudo cp ../config/erlang.list /etc/apt/sources.list.d/erlang.list
+sudo cp $FWROOT/config/erlang.list /etc/apt/sources.list.d/erlang.list
 
 fw_get http://binaries.erlang-solutions.com/debian/erlang_solutions.asc
 

+ 4 - 4
toolset/setup/linux/languages/php.sh

@@ -7,8 +7,8 @@
 RETCODE=$(fw_exists /usr/local/bin/php)
 [ ! "$RETCODE" == 0 ] || { \
   echo "Moving PHP config files into place"; 
-  sudo cp ../config/php.ini /usr/local/lib/php.ini
-  sudo cp ../config/php-fpm.conf /usr/local/lib/php-fpm.conf
+  sudo cp $FWROOT/config/php.ini /usr/local/lib/php.ini
+  sudo cp $FWROOT/config/php-fpm.conf /usr/local/lib/php-fpm.conf
   return 0; }
 
 fw_get http://museum.php.net/php5/php-5.4.13.tar.gz
@@ -18,8 +18,8 @@ cd php-5.4.13
 make
 sudo make install
 
-sudo cp ../config/php.ini /usr/local/lib/php.ini
-sudo cp ../config/php-fpm.conf /usr/local/lib/php-fpm.conf
+sudo cp $FWROOT/config/php.ini /usr/local/lib/php.ini
+sudo cp $FWROOT/config/php-fpm.conf /usr/local/lib/php-fpm.conf
 
 cd ..
 RETCODE=$(fw_exists /usr/local/lib/php/extensions/no-debug-non-zts-20100525/apc.so)