]> git.donarmstrong.com Git - debhelper.git/blobdiff - autoscripts/postinst-moveconffile
conffile moving idiocy
[debhelper.git] / autoscripts / postinst-moveconffile
diff --git a/autoscripts/postinst-moveconffile b/autoscripts/postinst-moveconffile
new file mode 100644 (file)
index 0000000..28f061e
--- /dev/null
@@ -0,0 +1,9 @@
+if [ "$1" = configure ]; then
+       if [ -e "#OLD#" ]; then
+               echo "Preserving user changes to #NEW# ..."
+               if [ -e "#NEW#" ]; then
+                       mv -f "#NEW#" "#NEW#.dpkg-new"
+               fi
+               mv -f "#OLD#" "#NEW#"
+       fi
+fi