summaryrefslogtreecommitdiffstats
path: root/debian/preinst
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:14:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:14:42 +0000
commit1b764f6d6dd92a2b4403a9a936836e20f1af8c2a (patch)
treee84d955c52339f39a12a1e5d99a189a32c46467d /debian/preinst
parentAdding upstream version 1:2.11. (diff)
downloadbash-completion-1b764f6d6dd92a2b4403a9a936836e20f1af8c2a.tar.xz
bash-completion-1b764f6d6dd92a2b4403a9a936836e20f1af8c2a.zip
Adding debian version 1:2.11-6.debian/1%2.11-6debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/preinst')
-rw-r--r--debian/preinst36
1 files changed, 36 insertions, 0 deletions
diff --git a/debian/preinst b/debian/preinst
new file mode 100644
index 0000000..3f24865
--- /dev/null
+++ b/debian/preinst
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ install|upgrade)
+ if [ -e /usr/share/doc/bash/completion-contrib ]; then
+ rm -rf /usr/share/doc/bash/completion-contrib
+ fi
+ # let's remove old bash-completion conffiles
+ for f in $(dpkg-query -W -f='${Conffiles}\n' bash-completion | grep bash_completion.d | cut -d\ -f2); do
+ dpkg-maintscript-helper rm_conffile $f 1:1.3-1 -- "$@"
+ done
+ if dpkg --compare-versions "$2" lt-nl 1:2.0-1 &&
+ dpkg --compare-versions "$2" ge 1:1.99-2 &&
+ [ -L /etc/bash_completion ] &&
+ [ "$(readlink /etc/bash_completion)" = \
+ /usr/share/bash-completion/bash_completion ]; then
+ rm -f /etc/bash_completion
+ fi
+ ;;
+
+ abort-upgrade)
+ ;;
+
+ *)
+ echo "preinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
+
+