summaryrefslogtreecommitdiff
path: root/debian/preinst
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-23 14:05:13 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:22:27 +0100
commit75c3e820b099247b9774dfe2499f59cef50c078e (patch)
tree08f5d5c2fe7390d7f22acddbd366985e097cfe02 /debian/preinst
parentbb0b78a0074c8f1e22f04bd828b6285f64f827fa (diff)
downloadlive-build-75c3e820b099247b9774dfe2499f59cef50c078e.zip
live-build-75c3e820b099247b9774dfe2499f59cef50c078e.tar.gz
Adding preinst to take care about package upgrades with respect to directories that are symlinks now (Closes: #442408, #442922).
Diffstat (limited to 'debian/preinst')
-rw-r--r--debian/preinst40
1 files changed, 40 insertions, 0 deletions
diff --git a/debian/preinst b/debian/preinst
new file mode 100644
index 0000000..1e6e21f
--- /dev/null
+++ b/debian/preinst
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+set -e
+
+case "${1}" in
+ install|upgrade)
+ if [ -h /usr/share/live-helper/data/debian-cd/lenny ]
+ then
+ rm -f /usr/share/live-helper/data/debian-cd/lenny
+ fi
+
+ if [ -h /usr/share/live-helper/data/debian-cd/sid ]
+ then
+ rm -f /usr/share/live-helper/data/debian-cd/sid
+ fi
+
+ if [ -d /usr/share/live-helper/includes ]
+ then
+ rm -rf /usr/share/live-helper/includes
+ fi
+
+ if [ -d /usr/share/live-helper/templates ]
+ then
+ rm -rf /usr/share/live-helper/templates
+ fi
+ ;;
+
+ abort-upgrade)
+
+ ;;
+
+ *)
+ echo "preinst called with unknown argument \`${1}'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0