summaryrefslogtreecommitdiff
path: root/data/zsh/_metadata/postinst
diff options
context:
space:
mode:
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