summaryrefslogtreecommitdiff
path: root/data/zsh/_metadata/postinst
diff options
context:
space:
mode:
authorSam Bingner <sam@bingner.com>2019-03-29 23:57:11 -1000
committerSam Bingner <sam@bingner.com>2019-03-29 23:57:11 -1000
commit75c2158d2a7b1ae2def3c5b31dbbf33148225902 (patch)
treecd868b1d46da40694b742966a1e3b65acdcc8073 /data/zsh/_metadata/postinst
parent06ef0d89ea57d333861c065c8c2870f3aa67b31b (diff)
Make dpkg exec smarter; Update bash, tcsh, and zsh
Diffstat (limited to 'data/zsh/_metadata/postinst')
-rwxr-xr-xdata/zsh/_metadata/postinst17
1 files changed, 17 insertions, 0 deletions
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