diff options
Diffstat (limited to 'debian/zsh-beta.postinst')
-rw-r--r-- | debian/zsh-beta.postinst | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/debian/zsh-beta.postinst b/debian/zsh-beta.postinst new file mode 100644 index 000000000..bcb754ba5 --- /dev/null +++ b/debian/zsh-beta.postinst @@ -0,0 +1,40 @@ +#!/bin/sh + +set -e + +case "$1" in + (configure) + : + ;; + (abort-upgrade|abort-remove|abort-deconfigure) + exit 0 + ;; + (*) + echo "postinst called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + + +for conffile in zlogin zlogout zprofile zshenv zshrc; do + dpkg-maintscript-helper rm_conffile /etc/zsh-beta/$conffile 5 -- "$@" +done +if [ -d /etc/zsh-beta ]; then + rmdir /etc/zsh-beta || true +fi + +update-alternatives --remove zsh-beta /usr/bin/zsh +update-alternatives --remove zsh-beta /bin/zsh4 +update-alternatives --remove zsh-beta /bin/zsh5 + +# Replace documentation directory with symlink +docdir="/usr/share/doc/zsh-beta" +if [ -d $docdir -a ! -L $docdir ]; then + if rmdir $docdir 2>/dev/null; then + ln -sf zsh-common $docdir + fi +fi + +#DEBHELPER# + +exit 0 |