move the branches directories up to the root of the repository
[matthijs/upstream/backupninja.git] / debian / backupninja.preinst
1 #!/bin/sh -e
2
3 # Remove the erroneous /etc/logrotate.d/backupninja directory if it exists
4
5 if [ -d /etc/logrotate.d/backupninja ] 
6 then
7         rm -f /etc/logrotate.d/backupninja/backupninja
8         rmdir /etc/logrotate.d/backupninja
9         if [ $? -ne 0 ]
10         then 
11                 cat << EOF
12
13 The /etc/logrotate.d/backupninja directory was created incorrectly by an earlier 
14 version of this package. When trying to remove this directory file(s) were found
15 inside this directory. There should be no files in this directory at all. 
16 Installation of this package will not proceed until you have cleaned this 
17 directory out.
18
19 EOF
20         
21                 exit 1
22         fi
23 fi
24
25 # dh_installdeb will replace this with shell code automatically
26 # generated by other debhelper scripts.
27
28 #DEBHELPER#
29
30 exit 0
31