-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathuninstall
executable file
·48 lines (38 loc) · 893 Bytes
/
uninstall
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
#!/bin/bash
#
# Uninstallation script for Matew - Make Album The Easy Way
#
# Do NOT edit this file.
# Configuration parameters (Do NOT edit)
RBINS="/usr/bin"
RCONF="/usr/share"
RDOCS="/usr/share/doc"
RMAN="/usr/share/man/man1"
# Checking if you have root access
if [ $(id -u) -ne 0 ]; then
echo -e "\n\033[1mWARNING\\033[0m: You must have root access (uid=0) to uninstall Matew\n"
exit 1
fi
# Functions
help() {
cat << HELP
Usage: $(basename $0) [option]
Run this script with no option and it will uninstall the Matew files
onto your system.
option:
-h print this message
HELP
exit 0
}
main() {
# Uninstalling the package files
rm -rf $RBINS/matew* $RCONF/matew $RDOCS/matew* $RMAN/matew.1.gz 2>/dev/null
echo -e "\n\033[1mMatew files uninstalled successfully.\033[0m\n"
exit 0
}
# Parse option flags
if [ ! -z "$1" ]; then
help
else
main
fi