summaryrefslogtreecommitdiff
path: root/debian/zsh-dbg.postinst
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2013-01-10 01:11:26 +0100
committerAxel Beckert <abe@deuxchevaux.org>2013-01-10 01:15:25 +0100
commite4bf431fae75fc53f2abb9bb44c149fc22f46841 (patch)
tree33efbd0fb324af3dc3bfa8e2be3ab7e68b06224a /debian/zsh-dbg.postinst
parent843e72f6f1d87be4939785d98a017c71e1084910 (diff)
downloadzsh-e4bf431fae75fc53f2abb9bb44c149fc22f46841.tar.gz
zsh-e4bf431fae75fc53f2abb9bb44c149fc22f46841.zip
zsh{,-dbg}.postinst: Create symlink to /usr/share/doc/zsh-common (Closes: #697808)
On purpose, dpkg doesn't replace directories with symlinks and vice-versa. Has to be done manually in the maintainer scripts. Thanks: Sebastian Ramacher <sramacher@debian.org>
Diffstat (limited to 'debian/zsh-dbg.postinst')
-rw-r--r--debian/zsh-dbg.postinst28
1 files changed, 28 insertions, 0 deletions
diff --git a/debian/zsh-dbg.postinst b/debian/zsh-dbg.postinst
new file mode 100644
index 000000000..dac01ba3b
--- /dev/null
+++ b/debian/zsh-dbg.postinst
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ (configure)
+ :
+ ;;
+ (abort-upgrade|abort-remove|abort-deconfigure)
+ exit 0
+ ;;
+ (*)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 0
+ ;;
+esac
+
+# Replace documentation directory with symlink
+docdir="/usr/share/doc/zsh-dbg"
+if [ -d $docdir -a ! -L $docdir ]; then
+ if rmdir $docdir 2>/dev/null; then
+ ln -sf zsh-common $docdir
+ fi
+fi
+
+#DEBHELPER#
+
+exit 0