blob: ebc9f0d6bbebec2c48b1e99b3846f94b5cbbec30 (
plain)
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
|
# J7Z: Installer: Arch
# Contributor: Xavion <Xavion (dot) 0 (at) Gmail (dot) com>
post_install() {
# Change file permissions
#chmod 777 /usr/share/J7Z/Source/
# Remove old files
user_remove
#/bin/true
}
post_upgrade() {
post_install
#/bin/true
}
pre_remove() {
/bin/true
}
user_remove() {
# User
if [ ${USER} ]; then
export USER=${LOGNAME}
fi
# Home
if [ ${SUDO_USER} ]; then
export HOME=/home/${SUDO_USER}
else
export HOME=/home/${USER}
fi
# KDE
rm -f ${HOME}/.kde*/share/kde4/services/ServiceMenus/?7Z*
rm -f ${HOME}/.kde*/share/apps/konqueror/servicemenus/?7Z*
# Gnome
rm -rf ${HOME}/.gnome2/nautilus-scripts/?7Z*
# Xfce
rm -f ${HOME}/.config/Thunar/uca.xml.?7Z
}
post_remove() {
#rm -rf /usr/share/J7Z/
user_remove
#/bin/true
}
op=$1
shift
$op "$@"
|