summaryrefslogtreecommitdiff
path: root/debian/postinst
diff options
context:
space:
mode:
Diffstat (limited to 'debian/postinst')
-rw-r--r--debian/postinst34
1 files changed, 34 insertions, 0 deletions
diff --git a/debian/postinst b/debian/postinst
new file mode 100644
index 000000000..88f042ac0
--- /dev/null
+++ b/debian/postinst
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ (configure)
+# if test -z "$2"; then
+ add-shell /bin/zsh
+ add-shell /usr/bin/zsh
+# fi
+ ;;
+ (abort-upgrade|abort-remove|abort-deconfigure)
+ exit 0
+ ;;
+ (*)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 0
+ ;;
+esac
+
+if test -x /usr/bin/update-menus ; then update-menus ; fi
+
+update-alternatives --remove zsh /usr/bin/zsh
+update-alternatives --remove ksh /usr/bin/zsh
+update-alternatives --remove ksh /bin/zsh4
+update-alternatives --install /bin/zsh zsh /bin/zsh5 50 \
+ --slave /usr/bin/zsh zsh-usrbin /bin/zsh5
+update-alternatives --install /bin/rzsh rzsh /bin/zsh5 50 \
+ --slave /usr/share/man/man1/rzsh.1.gz rzsh.1.gz /usr/share/man/man1/zsh.1.gz
+
+mkdir -m2775 -p /usr/local/share/zsh/site-functions && chown root:staff \
+ /usr/local/share/zsh/site-functions || true
+
+exit 0