Commit 96bfdc06 authored by TomKellyGenetics's avatar TomKellyGenetics
Browse files

remove will clear bashrc files

parent f4d547c8
Loading
Loading
Loading
Loading
+27 −29
Original line number Diff line number Diff line
@@ -107,19 +107,24 @@ else
    if [[ -w ${prefix} ]]
        then
        echo "rm -rf $prefix"
     else
         echo "Directory ${INSTALLDIR} not writeable"
         echo "Warning: installing manual requires root priviledges"
         echo "  Try running of the following:"
         echo "      sudo bash $( cd -P "$( dirname ${BASH_SOURCE[0]})" >/dev/null 2>&1 && pwd )/REMOVE"
         echo "      sudo make remove"
    fi
fi

#requires root priviledges if not installed in home directory
if [[ ! -d ${prefix} ]]
    then
INSTALLDIR=$prefix

#note does not apply to parent process (only within script for testing version call)
export PATH=$(echo $PATH | sed -e 's;$INSTALLDIR:;;g')
#echo "${INSTALLDIR} removed from PATH"
for SHELL_RC in `ls ~/.*rc`
    do
        sed "/^export PATH=:${INSTALLDIR}:\$PATH$" $SHELL_RC
        echo "universc-${version} will not added to PATH automatically in new ${SHELL} shell session"
    sed -i "s;^export PATH=${INSTALLDIR}:\$PATH$;;g" $SHELL_RC
    echo "universc-${current_version} will not added to PATH automatically in new ${SHELL} shell session"
done
echo "remove the following from ${Home}/.${SHELL}rc to remove it to your shell of choice"
echo "    export PATH=${INSTALLDIR}:\$PATH >> ~/.\${SHELL}rc"
@@ -132,13 +137,6 @@ if [[ ! -d ${prefix} ]]
echo " "
echo "    source $HOME/.${SHELL}rc"
echo " "
else
    echo "Directory ${INSTALLDIR} not writeable"
    echo "Warning: installing manual requires root priviledges"
    echo "  Try running of the following:"
    echo "      sudo bash $( cd -P "$( dirname ${BASH_SOURCE[0]})" >/dev/null 2>&1 && pwd )/REMOVE"
    echo "      sudo make remove"
fi

echo "UNINSTALL COMPLETE"
#Note this does not affect the variables in a parent process (interactive shell)
+1 −1
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ if [[ -f inst/.installed ]] || [[ $(which launch_universc.sh) != *"not found" ]
    if [[ $((10#$(ver $version))) == $((10#$(ver $current_version))) ]]
        then
        echo "universc ${current_version} is already installed in `which launch_universc.sh`"
        #exit 0${hour#0}
        exit 0
    elif [[ $((10#$(ver $version))) -lt $((10#$(ver $current_version))) ]]
        then
        echo "universc ${current_version} is already installed in `which launch_universc.sh`"