summaryrefslogtreecommitdiff
path: root/debian/zsh.postinst
diff options
context:
space:
mode:
Diffstat (limited to 'debian/zsh.postinst')
-rw-r--r--debian/zsh.postinst38
1 files changed, 38 insertions, 0 deletions
diff --git a/debian/zsh.postinst b/debian/zsh.postinst
new file mode 100644
index 000000000..c9952016c
--- /dev/null
+++ b/debian/zsh.postinst
@@ -0,0 +1,38 @@
+#!/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
+
+# ksh alternatives
+update-alternatives --remove ksh /usr/bin/zsh
+update-alternatives --remove ksh /bin/zsh4
+
+# Remove alternatives system for zsh in general
+update-alternatives --remove zsh /bin/zsh5
+update-alternatives --remove rzsh /bin/zsh5
+
+# New hardcoded symlinks which unfortunately can't be shipped inside
+# the package itself since some people want to merge /bin and /usr/bin
+# against FHS and all Unix tradition.
+if [ ! -e /usr/bin/zsh -a ! -L /usr/bin/zsh ]; then
+ ln -s /bin/zsh /usr/bin/zsh
+fi
+
+#DEBHELPER#
+
+exit 0