summaryrefslogtreecommitdiff
path: root/debian/postinst
diff options
context:
space:
mode:
authorDaniel Lewart <lewart3@gmail.com>2019-02-28 07:51:24 -0300
committerGabriel F. T. Gomes <gabriel@inconstante.eti.br>2019-03-01 18:35:24 -0300
commite70344f3379e5917c8ba8e273934fb2f93d2b73f (patch)
treee984dae773c7551e6a41fd502b8f0d3b5029f9fa /debian/postinst
parente08bb678f50918df9f3cffa4f10f36c2cfaa59ef (diff)
downloadbash-completion-e70344f3379e5917c8ba8e273934fb2f93d2b73f.tar.gz
Fix warning message for non-existent /etc/bash_completion.d (bug 923210)
Both "apt install bash-completion" and "apt purge bash-completion" generate the following warning: find: '/etc/bash_completion.d/': No such file or directory The cause is that postinst and postrm assume that /etc/bash_completion.d exists.
Diffstat (limited to 'debian/postinst')
-rw-r--r--debian/postinst10
1 files changed, 6 insertions, 4 deletions
diff --git a/debian/postinst b/debian/postinst
index ea6a309a..08638932 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -4,10 +4,12 @@ set -e
case "$1" in
configure)
- # let's remove old bash-completion conffiles
- for f in $(find /etc/bash_completion.d/ -type f -name "*.dpkg-*"); do
- dpkg-maintscript-helper rm_conffile ${f%.dpkg-*} 1:1.3-1 -- "$@"
- done
+ if [ -d /etc/bash_completion.d ]; then
+ # let's remove old bash-completion conffiles
+ for f in $(find /etc/bash_completion.d/ -type f -name "*.dpkg-*"); do
+ dpkg-maintscript-helper rm_conffile ${f%.dpkg-*} 1:1.3-1 -- "$@"
+ done
+ fi
if dpkg --compare-versions "$2" le "1:2.1-3"; then
if [ -d /etc/bash_completion.d/helpers ]; then