summaryrefslogtreecommitdiff
path: root/debian/dchroot.preinst
diff options
context:
space:
mode:
authorRoger Leigh <rleigh@debian.org>2006-07-10 10:47:51 +0000
committerRoger Leigh <rleigh@debian.org>2006-07-10 10:47:51 +0000
commit264c05b99a656344fd3f63efc03750dc9ae5a595 (patch)
treeb2b6858bd4ca5fc4ce49ddb0614a4f0515bd1025 /debian/dchroot.preinst
parentcffa08d3863fe8cac865188806f6fa6429401103 (diff)
downloadschroot-264c05b99a656344fd3f63efc03750dc9ae5a595.tar.gz
* debian/schroot.docs: Add the contents of debian/docs.
* debian/docs: Remove. * debian/rules: The /usr/share/doc directories for dchroot and dchroot-dsa are symlinks to schroot. * debian/dchroot.preinst: New file. Remove /usr/share/doc/dchroot. * debian/dchroot-dsa.preinst: New file. Remove /usr/share/doc/dchroot-dsa. * debian/changelog: Update.
Diffstat (limited to 'debian/dchroot.preinst')
-rw-r--r--debian/dchroot.preinst41
1 files changed, 41 insertions, 0 deletions
diff --git a/debian/dchroot.preinst b/debian/dchroot.preinst
new file mode 100644
index 00000000..cd423faa
--- /dev/null
+++ b/debian/dchroot.preinst
@@ -0,0 +1,41 @@
+#!/bin/sh
+# preinst script for dchroot
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <new-preinst> `install'
+# * <new-preinst> `install' <old-version>
+# * <new-preinst> `upgrade' <old-version>
+# * <old-preinst> `abort-upgrade' <new-version>
+#
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ install|upgrade)
+ if dpkg --compare-versions "$2" lt "0.99.3-1"; then
+ rm -rf /usr/share/doc/dchroot
+ fi
+ ;;
+
+ abort-upgrade)
+ ;;
+
+ *)
+ echo "preinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+