]> git.decadent.org.uk Git - ion3.git/blobdiff - debian/ion3.postinst
Applied upstream version check to upgrades as well. I wrongly remembered that this...
[ion3.git] / debian / ion3.postinst
index 30850138ae4bbd45d87d3f1b49092e572e2932ae..f8e8fd92d20d02d1d7bdbf2c6819b51d2fa61391 100644 (file)
@@ -3,9 +3,11 @@ set -e
 . /usr/share/debconf/confmodule
 
 UPSTREAM_VERSION=
+DEBIAN_VERSION=
 
-if [ "$1" = configure -a "$2" = "" ]; then
-    # Installing for the first time (or after a purge).
+if [ "$1" = configure ] \
+    && dpkg --compare-versions "$2" lt "$DEBIAN_VERSION"; then
+    # Installing for the first time or upgrading.
     # To comply with the Ion trademark licence terms, we must ensure
     # that this version is up-to-date or that the user acknowledges
     # it is not.  I freely admit that this is a horrible abuse of