]> Creatis software - creaToolsTools.git/blobdiff - Linux/scripts/CreaTools-uninstall.sh
*** empty log message ***
[creaToolsTools.git] / Linux / scripts / CreaTools-uninstall.sh
index a4bbbcdb52a9e2883d7f96f0d52a489ce04f20dc..82b2acff97999ca165f0f6b6b1ba874b7084c886 100644 (file)
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
 
-echo "in uninstall"
-if [ $UID = 0 ] 
-then
+ echo "in uninstall"
+if [ $UID = 0 ] 
+then
   # Set all local variables
   source $PWD/scripts/CreaTools-configure.sh
   
@@ -68,26 +68,39 @@ rm -rf creaMaracasVisu
   
   cd ../lib
   # this one is riskless
+echo "rm lib's"  
   rm -rf creatools
   
   cd ../share
   # this one is riskless
+  echo "rm share's"
   rm -rf bbtk creaImageIO creaNewProject creaContours creaMaracasVisu  
   rm -f creatools_base_library_config.sh
 
+
+  #if [ ! -f /etc/bashrc ]
+  #then
+  #    export ETC_BASHRC="/etc/bash.bashrc"
+  #else
+  #    export ETC_BASHRC="/etc/bashrc"
+  #fi
+  #  echo "revert $ETC_BASHRC to previous value"
   # revert /etc/bashrc to previous value  
-  # - remove line 'sh $installPrefix/creatools_install/share/creatools_base_party_libraries_config.sh'
-  sed -i -e '/.*creatools_base_library_config.*/ d' /etc/bashrc 
+  # - remove line 'bash $installPrefix/creatools_install/share/creatools_base_party_libraries_config.sh'
+  #sed -i -e '/.*creatools_base_library_config.*/ d' $ETC_BASHRC 
+  
+echo "revert $HOME/.bashrc to previous value"  
+sed -i -e '/.*creatools_base_library_config.*/ d' $HOME/.bashrc
 
-else
-  echo
-  echo "..ERROR.."
-  echo "==================================================="
-  echo "REMEMBER !"
-  echo ""
-  echo "YOU NEED TO RUN THIS ONE AS root"
-  echo "==================================================="
-  echo
-  echo
-fi 
+#else
+#  echo
+#  echo "..ERROR.."
+#  echo "==================================================="
+#  echo "REMEMBER !"
+# echo ""
+#  echo "YOU NEED TO RUN THIS ONE AS root"
+#  echo "==================================================="
+#  echo
+#  echo
+#fi