summaryrefslogtreecommitdiff
path: root/debian/zsh5
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2016-01-31 20:20:28 +0100
committerAxel Beckert <abe@deuxchevaux.org>2016-01-31 20:22:02 +0100
commitda1b680be1e3307cc2c2de34b81be554f4a32be6 (patch)
treee3b967df4179d87f45aeb6704ba1cc6f9d0acedb /debian/zsh5
parent0013070a348a68ced5894522501ad3b17d26e7fb (diff)
downloadzsh-da1b680be1e3307cc2c2de34b81be554f4a32be6.tar.gz
zsh-da1b680be1e3307cc2c2de34b81be554f4a32be6.zip
Remove usage of alternatives system for zsh, rzsh and zsh-static
This also fixes installation together with usrmerge, which fiddles with the directory layout and makes /bin a symlink to /usr/bin against all Unix tradition and violating FHS. Closes: #768079
Diffstat (limited to 'debian/zsh5')
-rw-r--r--debian/zsh527
1 files changed, 27 insertions, 0 deletions
diff --git a/debian/zsh5 b/debian/zsh5
new file mode 100644
index 000000000..91b831c5b
--- /dev/null
+++ b/debian/zsh5
@@ -0,0 +1,27 @@
+#!/bin/zsh -f
+
+# This wrapper's sole purpose is to ease the migration of zsh's binary
+# location from /bin/zsh5 to /bin/zsh between Debian Jessie and
+# Stretch since zsh no more uses the alternatives system as there is
+# only one version of zsh left in Debian since Jessie.
+#
+# Related bug report: https://bugs.debian.org/768079
+
+if [[ "$0" == *zsh5* ]]; then
+ static=''
+ if [[ "$0" == *static* ]]; then
+ static=-static
+ fi
+
+ echo ""
+ echo " ####"
+ echo " #### $0 is deprecated, please switch to /bin/zsh${static} (or /usr/bin/zsh)"
+ if [[ "$1" == "-l" || "$0" == -* ]]; then
+ echo ' #### Use "chsh -s '"/bin/zsh${static}"'" to change your login shell'
+ fi
+ echo " #### This command ($0) will disappear eventually!"
+ echo " ####"
+ echo ""
+fi 1>&2
+
+exec "/bin/zsh${static}" "$@"