forked from AllskyTeam/allsky
-
Notifications
You must be signed in to change notification settings - Fork 0
/
uninstall.sh
executable file
·34 lines (32 loc) · 1019 Bytes
/
uninstall.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color
INSTALL_DIR="allsky"
DIR=$(basename "$PWD")
if [ "$DIR" != "$INSTALL_DIR" ] ; then
(echo
echo -e "${RED}**********"
echo -e "Please run this script from the '$INSTALL_DIR' directory."
echo -e "**********${NC}"
echo) 1>&2
exit 1
fi
echo
echo -e "${RED}This will remove all non-config, system files from your computer."
echo
echo "Note: This only removes files in their default location."
echo
read -p "ARE YOU SURE? [y/n] " ans_yn
echo -en "${NC}"
case "$ans_yn" in
[Yy]|[Yy][Ee][Ss])
sudo make uninstall
echo -e "${RED}All non-config system files removed.${NC}"
echo "A few things of note:"
echo -e " - To remove all traces of 'allsky' (${RED}This cannot be undone!${NC}), please run: 'cd; sudo rm -rf allsky'"
echo " - If you wish to only remove config files, please run 'sudo make remove_configs'"
echo " - If you wish to only remove compiled binaries, please run 'make clean'"
;;
*) exit 3;;
esac