-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathpackage.install
More file actions
38 lines (31 loc) · 974 Bytes
/
package.install
File metadata and controls
38 lines (31 loc) · 974 Bytes
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
post_install() {
echo "==> ESPionage has been installed successfully."
echo "==> You can now run 'espionage --help' to see help menu"
echo "==> You can also use your package manager to uninstall espionage"
echo "==> Note: Application files have been placed in your home directory."
}
post_upgrade() {
echo "==> ESPionage has been upgraded."
}
pre_remove() {
if [ -n "$SUDO_USER" ]; then
USER_HOME=$(getent passwd "$SUDO_USER" | cut -d: -f6)
else
USER_HOME=$HOME
fi
LOCAL_DIR="$USER_HOME/.local/share/espionage"
APP_DIR="$USER_HOME/.local/lib/espionage"
echo "==> Cleaning up user-specific ESPionage files..."
if [ -d "$LOCAL_DIR" ]; then
echo "==> Removing data directory: $LOCAL_DIR"
rm -rf "$LOCAL_DIR"
fi
if [ -d "$APP_DIR" ]; then
echo "==> Removing application directory: $APP_DIR"
rm -rf "$APP_DIR"
sudo rm /usr/bin/espionage
fi
}
post_remove() {
echo "==> ESPionage has been successfully removed."
}