From 3d7f82e549c6c6f5fa5fc95242e51aef744cf6bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20O=C5=BCarowski?= <piotr@debian.org> Date: Fri, 2 Jul 2010 15:35:44 +0200 Subject: [PATCH] actually... invoke only when $1 = upgrade --- autoscripts/preinst-pycentral-clean | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/autoscripts/preinst-pycentral-clean b/autoscripts/preinst-pycentral-clean index 72cfa8e..2446a14 100644 --- a/autoscripts/preinst-pycentral-clean +++ b/autoscripts/preinst-pycentral-clean @@ -1,9 +1,6 @@ # make sure python-central files are removed before new package is installed -case "$1" in - install|upgrade) - if [ -f /var/lib/pycentral/#PACKAGE#.pkgremove ] - then - pycentral pkgremove #PACKAGE# - rm -f /var/lib/pycentral/#PACKAGE#.pkgremove - fi -esac +if [ "$1" = upgrade ] && [ -f /var/lib/pycentral/#PACKAGE#.pkgremove ] +then + pycentral pkgremove #PACKAGE# + rm -f /var/lib/pycentral/#PACKAGE#.pkgremove +fi -- GitLab