X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Linux%2Fscripts%2FCreaTools-uninstall.sh;h=82b2acff97999ca165f0f6b6b1ba874b7084c886;hb=6a4393e29e2ad4c755ff2d31d53e0f9823ddd1bd;hp=887c2a869a92b385316e22c2e8d935cb4301bac5;hpb=ebef432aefca42911025c79d171e00212d329e27;p=creaToolsTools.git diff --git a/Linux/scripts/CreaTools-uninstall.sh b/Linux/scripts/CreaTools-uninstall.sh index 887c2a8..82b2acf 100644 --- a/Linux/scripts/CreaTools-uninstall.sh +++ b/Linux/scripts/CreaTools-uninstall.sh @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash - -if [ $UID = 0 ] -then + echo "in uninstall" +# if [ $UID = 0 ] +# then # Set all local variables source $PWD/scripts/CreaTools-configure.sh @@ -42,7 +42,7 @@ rm -f creaNewProject.sh #rm -rf crea* # WARNING : this list must be updated when new package is added - +echo "rm include's" rm -rf bbappli rm -rf bbcreaContours rm -rf bbcreaImageIO @@ -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