updated on Tue Jan 17 00:10:10 UTC 2012
[aur-mirror.git] / q7z / Q7Z.install
blob161631861a2f67e224f4e22d783b5fb387ccf3fc
1 # Q7Z: Installer: Arch
2 # Contributor: Xavion <Xavion (dot) 0 (at) Gmail (dot) com>
4 post_install() {
5         # Change file permissions
6         chmod 777 /usr/share/Q7Z/Source/
8         # Remove old files
9         user_remove
11         #/bin/true
14 post_upgrade() {
15         post_install
16         #/bin/true
19 pre_remove() {
20         /bin/true
23 user_remove() {
24         # User
25         if [ ${USER} ]; then
26                 export USER=${LOGNAME}
27         fi
29         # Home
30         if [ ${SUDO_USER} ]; then
31                 export HOME=/home/${SUDO_USER}
32         else
33                 export HOME=/home/${USER}
34         fi
36         # KDE
37         rm -f ${HOME}/.kde*/share/kde4/services/ServiceMenus/?7Z*
38         rm -f ${HOME}/.kde*/share/apps/konqueror/servicemenus/?7Z*
40         # Gnome
41         rm -rf ${HOME}/.gnome2/nautilus-scripts/Archiving/?7Z*
43         # Xfce
44         rm -f ${HOME}/.config/Thunar/uca.xml.?7Z
47 post_remove() {
48         rm -rf /usr/share/Q7Z/
50         user_remove
52         #/bin/true
55 op=$1
56 shift
58 $op "$@"