skeleton/debian/DISTNAME.prerm.tmpl
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 12 Nov 2009 09:33:55 +0100
branchstable
changeset 3822 b61c7b065a66
parent 0 b97547f5f1fa
permissions -rw-r--r--
do not fail if anon user == manager, simply emit warning that it should not be done in production. close #469395

#!/bin/sh -e

delete_pyo_pyc () {
  find /usr/share/cubicweb/cubes/%(cubename)s -name "*.pyc" | xargs rm -f
  find /usr/share/cubicweb/cubes/%(cubename)s -name "*.pyo" | xargs rm -f
}


case "$1" in
    failed-upgrade|abort-install|abort-upgrade|disappear)
    ;;
    upgrade)
    delete_pyo_pyc
    ;;
    remove)
    delete_pyo_pyc
    ;;
    purge)
    ;;

    *)
        echo "postrm called with unknown argument \`$1'" >&2
        exit 1

esac

#DEBHELPER#