summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
authorDavid Paleino <dapal@debian.org>2011-04-06 12:48:18 +0200
committerDavid Paleino <dapal@debian.org>2011-04-06 17:54:41 +0200
commitd0b5ec9da84ca7cf096d491419b968e3ec5ece72 (patch)
tree17282bba2c44932c5f592cb67734506e57e08db8 /debian/rules
parentbde01f8408fcbbd37fe5fd31eef7d2ec8a35c716 (diff)
downloadbash-completion-d0b5ec9da84ca7cf096d491419b968e3ec5ece72.tar.gz
Implement triggers: activate completions when something is installed in $PATH (drawback: paths are hardcoded in debian/triggers)
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules21
1 files changed, 21 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
index 5096e1c7..6f101697 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,6 +13,27 @@ override_dh_auto_configure:
[ -d test/log ] || mkdir -p test/log
[ -d test/tmp ] || mkdir -p test/tmp
+override_dh_auto_build:
+ dh_auto_build
+
+ grep -w "have" completions/* | \
+ grep "have " | \
+ sed -e "s/ || have//g" \
+ -e "s/ ||.*//g" \
+ -e "s/ &&\(^ have\)*//g" \
+ -e "/[ ]*#/d" \
+ -e "s/\[.*\] //g" \
+ -e "s/ {//g" \
+ -e "s/:.*have /:/g" \
+ -e "s/ \\\//g" \
+ -e "s/ complete -F .*//g" \
+ -e "s/;.*//g" \
+ -e "s/ _.*()//g" \
+ -e "s/)//g" \
+ -e "s/ \[.*\]//g" \
+ -e "/.*UNAME.*/d" \
+ > debian/compdict
+
override_dh_compress:
dh_compress -Xcompletions