updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / dropbox-daemon / dropbox-daemon.install
blobafab347b4bf2e9d09651342c09318d9a0c83ae06
1 ## arg 1:  the new package version
2 pre_install() {
4   if [ -e "/etc/conf.d/dropboxd-userspace.conf" ]; then
5     cp /etc/conf.d/dropboxd-userspace.conf /tmp/dropboxd.conf
6     if [ -e "/etc/dropboxd.conf" ]; then
7       echo "found both dropboxd.conf and dropboxd-userspace.conf"
8       echo "if you want to keep dropboxd-userspace.conf, please"
9       echo "copy it manually to /etc/conf.d/dropboxd.conf"
10     fi
12     if [ -e "/etc/conf.d/dropboxd.conf" ]; then
13       echo "found both dropboxd.conf and dropboxd-userspace.conf"
14       echo "if you want to keep dropboxd-userspace.conf, please"
15       echo "copy it manually to /etc/conf.d/dropboxd.conf"
16     fi
18   fi
20   if [ -e "/etc/dropboxd-userspace.conf" ]; then
21     cp /etc/dropboxd-userspace.conf /tmp/dropboxd.conf
22     if [ -e "/etc/dropboxd.conf" ]; then
23       echo "found both dropboxd.conf and dropboxd-userspace.conf"
24       echo "if you want to keep dropboxd-userspace.conf, please"
25       echo "copy it manually to /etc/conf.d/dropboxd.conf"
26     fi
28     if [ -e "/etc/conf.d/dropboxd.conf" ]; then
29       echo "found both dropboxd.conf and dropboxd-userspace.conf"
30       echo "if you want to keep dropboxd-userspace.conf, please"
31       echo "copy it manually to /etc/conf.d/dropboxd.conf"
32     fi
33   fi
35   if [ -e "/etc/dropboxd.conf" ]; then
36     cp /etc/dropboxd.conf /tmp/dropboxd.conf
37   fi
39   if [ -e "/etc/conf.d/dropboxd.conf" ]; then
40     cp /etc/conf.d/dropboxd.conf /tmp/dropboxd.conf
41   fi
44 ## arg 1:  the new package version
45 post_install() {
46   if [ ! -e "/tmp/dropboxd.conf" ]; then
47     echo "Remember to edit /etc/conf.d/dropboxd.conf"
48   fi
50   if [ -e "/tmp/dropboxd.conf" ]; then
51     mv /tmp/dropboxd.conf /etc/conf.d/dropboxd.conf
52   fi
55 ## arg 1:  the new package version
56 ## arg 2:  the old package version
57 pre_upgrade() { # Save old config
58   pre_install
61 ## arg 1:  the new package version
62 ## arg 2:  the old package version
63 post_upgrade() { # restore old config
64   if [ -e "/tmp/dropboxd.conf" ]; then
65     mv /tmp/dropboxd.conf /etc/conf.d/dropboxd.conf
66   fi
69 ## arg 1:  the old package version
70 pre_remove() {
71   echo ""
74 ## arg 1:  the old package version
75 post_remove() {
76   echo ""
79 # vim:set ts=2 sw=2 et: