paul@2 | 1 | #! /bin/sh |
paul@3 | 2 | # postinst script for python-astgrep |
paul@2 | 3 | # |
paul@2 | 4 | # see: dh_installdeb(1) |
paul@2 | 5 | |
paul@2 | 6 | set -e |
paul@2 | 7 | |
paul@2 | 8 | # summary of how this script can be called: |
paul@2 | 9 | # * <postinst> `configure' <most-recently-configured-version> |
paul@2 | 10 | # * <old-postinst> `abort-upgrade' <new version> |
paul@2 | 11 | # * <conflictor's-postinst> `abort-remove' `in-favour' <package> |
paul@2 | 12 | # <new-version> |
paul@2 | 13 | # * <deconfigured's-postinst> `abort-deconfigure' `in-favour' |
paul@2 | 14 | # <failed-install-package> <version> `removing' |
paul@2 | 15 | # <conflicting-package> <version> |
paul@2 | 16 | # for details, see http://www.debian.org/doc/debian-policy/ or |
paul@2 | 17 | # the debian-policy package |
paul@2 | 18 | # |
paul@2 | 19 | # quoting from the policy: |
paul@2 | 20 | # Any necessary prompting should almost always be confined to the |
paul@2 | 21 | # post-installation script, and should be protected with a conditional |
paul@2 | 22 | # so that unnecessary prompting doesn't happen if a package's |
paul@2 | 23 | # installation fails and the `postinst' is called with `abort-upgrade', |
paul@2 | 24 | # `abort-remove' or `abort-deconfigure'. |
paul@2 | 25 | |
paul@3 | 26 | PACKAGE=python-astgrep |
paul@2 | 27 | |
paul@2 | 28 | case "$1" in |
paul@2 | 29 | configure|abort-upgrade|abort-remove|abort-deconfigure) |
paul@3 | 30 | chmod ugo+rx /usr/bin/astgrep |
paul@2 | 31 | ;; |
paul@2 | 32 | |
paul@2 | 33 | *) |
paul@2 | 34 | echo "postinst called with unknown argument \`$1'" >&2 |
paul@2 | 35 | exit 1 |
paul@2 | 36 | ;; |
paul@2 | 37 | esac |
paul@2 | 38 | |
paul@2 | 39 | |
paul@2 | 40 | |
paul@2 | 41 | exit 0 |
paul@2 | 42 | |
paul@2 | 43 | |