inasafe/inasafe

View on GitHub
scripts/inasafe-uninstall

Summary

Maintainability
Test Coverage
#! /bin/bash

echo "---------------------------------------------------------"
echo "Uninstalling InaSAFE                               "
echo
echo "This will completely remove InaSAFE, its datasets, "
echo "and .bash_aliases - although a copy will be left in      "
echo ".bash_aliases_risiko_copy                                "
echo
echo "System wide Risiko dependencies will be left intact      "
echo

read -p "Do you wish to remove InaSAFE [Y/N](N) ?" answer
case $answer in
    y | Y | yes | YES | Yes) answer="y";;
    * ) echo "OK - nothing done"; exit 0;
esac

read -p "ARE YOU SURE [Y/N](N) ?" answer
case $answer in
    y | Y | yes | YES | Yes) answer="y";;
    * ) echo "OK - nothing done"; exit 0;
esac

echo "Moving .bash_alias to .bash_aliases_risiko_copy"
sudo mv -f ~/.bash_aliases ~/.bash_aliases_risiko_copy

echo "Removing InaSAFE"
/bin/rm -rf $InaSAFEQGIS
cd

echo
echo "Success, You have removed InaSAFE!"
echo
echo "If you want to reinstall "
echo "1) Make a new empty area (say ~/work) and cd to it"
echo "2) wget bit.ly/inasafe-install"
#echo "2) wget https://raw.github.com/AIFDR/inasafe/master/scripts/inasafe-install"
echo "3) ./inasafe-install"
echo