diff options
author | Sam Bingner <sam@bingner.com> | 2019-03-29 23:57:11 -1000 |
---|---|---|
committer | Sam Bingner <sam@bingner.com> | 2019-03-29 23:57:11 -1000 |
commit | 75c2158d2a7b1ae2def3c5b31dbbf33148225902 (patch) | |
tree | cd868b1d46da40694b742966a1e3b65acdcc8073 /data/zsh | |
parent | 06ef0d89ea57d333861c065c8c2870f3aa67b31b (diff) |
Make dpkg exec smarter; Update bash, tcsh, and zsh
Diffstat (limited to 'data/zsh')
-rw-r--r-- | data/zsh/_metadata/depends | 1 | ||||
-rwxr-xr-x | data/zsh/_metadata/postinst | 17 | ||||
-rwxr-xr-x | data/zsh/_metadata/prerm | 25 |
3 files changed, 43 insertions, 0 deletions
diff --git a/data/zsh/_metadata/depends b/data/zsh/_metadata/depends new file mode 100644 index 000000000..e089aacc5 --- /dev/null +++ b/data/zsh/_metadata/depends @@ -0,0 +1 @@ +dpkg (>= 1.18.25-10) diff --git a/data/zsh/_metadata/postinst b/data/zsh/_metadata/postinst new file mode 100755 index 000000000..70fa1d460 --- /dev/null +++ b/data/zsh/_metadata/postinst @@ -0,0 +1,17 @@ +#!/bin/zsh + +set -e + +if [ ! -e /bin/sh ]; then + ln -s zsh /bin/sh +fi + +case "$1" in + abort-remove|configure) + dpkg-divert --quiet --local --divert /bin/sh.distrib /bin/sh + update-alternatives --quiet --install /bin/sh sh /bin/zsh 100 || true + ;; + *) + exit 0 + ;; +esac diff --git a/data/zsh/_metadata/prerm b/data/zsh/_metadata/prerm new file mode 100755 index 000000000..bf7fadd2e --- /dev/null +++ b/data/zsh/_metadata/prerm @@ -0,0 +1,25 @@ +#!/bin/zsh + +set -e + +case "$1" in + upgrade) + ;; + + remove|deconfigure) + update-alternatives --quiet --remove sh /bin/zsh + dpkg-divert --quiet --remove /bin/sh + if [ ! -e /bin/sh ]; then + echo There would be no shell! + ln -s zsh /bin/sh + exit 1 + fi + ;; + + failed-upgrade) + ;; + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac |