Repository navigation
Expand file tree
/
Copy pathuninstall.sh
More file actions
74 lines (61 loc) · 1.67 KB
/
Copy pathuninstall.sh
File metadata and controls
74 lines (61 loc) · 1.67 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/usr/bin/env bash
set -o errexit
src="${BASH_SOURCE[0]}"
while [[ -h "${src}" ]]; do
dir="$(
cd -P "$(
command dirname "${src}"
)" > /dev/null 2>&1 && pwd
)"
src="$(command readlink "${src}")"
[[ "${src}" != /* ]] && src="${dir}/${src}"
done
dir="$(
cd -P "$(
command dirname "${src}"
)" > /dev/null 2>&1 && pwd
)"
export root="${dir}"; readonly root
source "${root}/.install/include.sh"
include : '(
.install/color
.install/variable
.install/error
.install/getinstall
)'
HOME="${HOME}"
__RMBK__=false
__NRMCFG__=false
while [[ ${#} -gt 0 ]]; do
case "${1}" in
"--home="*) export HOME="${1#*=}" ;;
"--remove-backup") export __RMBK__=true ;;
"--no-remove-config") export __NRMCFG__=true ;;
esac
shift
done
if [[ "${__RMBK__}" == true ]]; then
install::getinstall \
"
command rm -f \
${opt}/${targetins}_*.zip.bak \
${HOME}/.termux/termux.properties_*.bak \
${HOME}/.termux/font.ttf_*.bak \
${HOME}/.termux/colors.properties_*.bak
" \
"Removing all backup..."
fi
install::getinstall \
"command rm -rf ${opt}/${targetins}" \
"Removing: ${color_GG}${opt}/${targetins}${color_N}"
install::getinstall \
"command rm -f ${bin}/${targetins}" \
"Removing: ${color_GG}${bin}/${targetins}${color_N}"
if [[ "${__NRMCFG__}" == false ]]; then
install::getinstall \
"command rm -rf ${HOME}/.config/${targetins}" \
"Removing: ${color_GG}${HOME}/.config/${targetins}${color_N}"
fi
echo -e "${color_GG}[+] ${color_N}${targetins^} removed!"
trap - ERR EXIT
exit ${?}