]> Creatis software - cpPlugins.git/commitdiff
...
authorLeonardo Florez-Valencia <florez-l@javeriana.edu.co>
Mon, 25 Apr 2016 17:40:56 +0000 (12:40 -0500)
committerLeonardo Florez-Valencia <florez-l@javeriana.edu.co>
Mon, 25 Apr 2016 17:40:56 +0000 (12:40 -0500)
third_party_installers/cpPlugins_Install_ITK.sh
third_party_installers/cpPlugins_Install_QT4.sh
third_party_installers/cpPlugins_Install_VTK.sh

index baf70ebb3239aafeb0c28f02f3ba9df68f8acb86..d716a854ffd4af4b7ad47bf6cfd3940b0ea3e4f4 100755 (executable)
@@ -1,5 +1,23 @@
 #!/bin/bash
 
+function abspath()
+{
+    pushd . > /dev/null
+    if [ -d "$1" ]; then
+        cd "$1"
+        dirs -l +0
+    else
+        cd "`dirname \"$1\"`"
+        cur_dir=`dirs -l +0`
+        if [ "$cur_dir" == "/" ]; then
+            echo "$cur_dir`basename \"$1\"`"
+        else
+            echo "$cur_dir/`basename \"$1\"`"
+        fi
+    fi
+    popd > /dev/null
+}
+
 ## Some configuration variables
 number_of_processes="-j4"
 comp_type=Debug
@@ -37,7 +55,7 @@ if [ "$#" -eq 1 ]; then
         echo "$0: Invalid file type."
         exit 1
     fi
-    canonical_path=`readlink -e $1`
+    canonical_path=`abspath $1`
     source_dir=`dirname $canonical_path`/`basename $1 .$actual_ext`
     build_dir=`dirname $canonical_path`/`basename $1 .$actual_ext`-build
     echo -n "Cleaning directories... "
index a80a12d3c0932ce6a083939cdbf0f41dacf6d7cd..6d2c30d44f1ab8b36475f2fc8b78c61c6d1d9f18 100755 (executable)
@@ -1,5 +1,23 @@
 #!/bin/bash
 
+function abspath()
+{
+    pushd . > /dev/null
+    if [ -d "$1" ]; then
+        cd "$1"
+        dirs -l +0
+    else
+        cd "`dirname \"$1\"`"
+        cur_dir=`dirs -l +0`
+        if [ "$cur_dir" == "/" ]; then
+            echo "$cur_dir`basename \"$1\"`"
+        else
+            echo "$cur_dir/`basename \"$1\"`"
+        fi
+    fi
+    popd > /dev/null
+}
+
 ## Some configuration variables
 number_of_processes="-j4"
 comp_type=-debug
@@ -22,7 +40,7 @@ if [ "$#" -eq 1 ]; then
         echo "$0: Invalid file type."
         exit 1
     fi
-    canonical_path=`readlink -e $1`
+    canonical_path=`abspath $1`
     source_dir=`dirname $canonical_path`/`basename $1 .$actual_ext`
     build_dir=`dirname $canonical_path`/`basename $1 .$actual_ext`-build
     echo -n "Cleaning directories... "
index 7cce532f1b4628949a71ce44fc748bd4b3842f1c..0812809a93ab0b6645a0308785c2fa8980f99749 100755 (executable)
@@ -1,5 +1,23 @@
 #!/bin/bash
 
+function abspath()
+{
+    pushd . > /dev/null
+    if [ -d "$1" ]; then
+        cd "$1"
+        dirs -l +0
+    else
+        cd "`dirname \"$1\"`"
+        cur_dir=`dirs -l +0`
+        if [ "$cur_dir" == "/" ]; then
+            echo "$cur_dir`basename \"$1\"`"
+        else
+            echo "$cur_dir/`basename \"$1\"`"
+        fi
+    fi
+    popd > /dev/null
+}
+
 ## Some configuration variables
 number_of_processes="-j4"
 comp_type=Debug
@@ -55,7 +73,7 @@ if [ "$#" -eq 1 ]; then
         echo "$0: Invalid file type."
         exit 1
     fi
-    canonical_path=`readlink -e $1`
+    canonical_path=`abspath $1`
     source_dir=`dirname $canonical_path`/`basename $1 .$actual_ext`
     build_dir=`dirname $canonical_path`/`basename $1 .$actual_ext`-build
     echo -n "Cleaning directories... "