]> Creatis software - cpPlugins.git/blobdiff - third_party_installers/cpPlugins_Install_QT4.sh
...
[cpPlugins.git] / third_party_installers / cpPlugins_Install_QT4.sh
index 6d2c30d44f1ab8b36475f2fc8b78c61c6d1d9f18..76fdddeccf9183ec4b71b77e14e13a3ec162d30d 100755 (executable)
@@ -20,7 +20,6 @@ function abspath()
 
 ## Some configuration variables
 number_of_processes="-j4"
-comp_type=-debug
 platform=`uname`
 particular_options=""
 if [ "$platform" == "Darwin" ]; then
@@ -28,7 +27,7 @@ if [ "$platform" == "Darwin" ]; then
 fi
 
 ## Check input parameters and process inputs (if needed)
-if [ "$#" -eq 1 ]; then
+if [ "$#" -eq 2 ]; then
     valid_extensions=("zip" "tar" "tar.gz" "tar.bz2")
     actual_ext=""
     for ext in ${valid_extensions[@]}; do
@@ -65,11 +64,13 @@ if [ "$#" -eq 1 ]; then
         exit 1
     fi
     echo "done!"
-elif [ "$#" -eq 2 ]; then
+    build_type=$2
+elif [ "$#" -eq 3 ]; then
     source_dir=`dirname $1`
     build_dir=`dirname $2`
+    build_type=$3
 else
-    echo "Usage: [qt4_package] or [qt4_source_dir qt4_build_dir]" 
+    echo "Usage: [qt4_package] or [qt4_source_dir qt4_build_dir] [build_type]
 fi
 
 echo "Given source dir : \"$source_dir\""
@@ -79,7 +80,7 @@ echo "Configuring sources... "
 cd $build_dir
 $source_dir/configure \
     -prefix ${HOME}/local \
-    $comp_type \
+    $build_type \
     -opensource -shared -fast \
     -no-phonon \
     -no-phonon-backend \