[osm-tile-server] 45/70: Added preinst for moving old data directory out of the way.
Ruben Undheim
rubund-guest at moszumanska.debian.org
Tue Nov 3 23:13:06 UTC 2015
This is an automated email from the git hooks/post-receive script.
rubund-guest pushed a commit to branch master
in repository osm-tile-server.
commit 85ad389154813a930a22ea62fbbb94ee4d49e625
Author: Ruben Undheim <ruben.undheim at gmail.com>
Date: Sun Oct 11 13:02:44 2015 +0200
Added preinst for moving old data directory out of the way.
---
debian/openstreetmap-carto.preinst | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/debian/openstreetmap-carto.preinst b/debian/openstreetmap-carto.preinst
new file mode 100644
index 0000000..45219d8
--- /dev/null
+++ b/debian/openstreetmap-carto.preinst
@@ -0,0 +1,38 @@
+#!/bin/sh
+# preinst script for magic
+#
+# 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 https://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ install|upgrade)
+ if [ -d /usr/share/openstreetmap-carto/data ] ; then
+ mv /usr/share/openstreetmap-carto/data /usr/share/openstreetmap-carto/data.old
+ 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
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/osm-tile-server.git
More information about the Pkg-grass-devel
mailing list