]>
git.ipfire.org Git - thirdparty/util-linux.git/blob - tools/checkcompletion.sh
4 # This script checks if we have bash-completion scripts for the all compiled
7 # Copyright (C) 2016 Karel Zak <kzak@redhat.com>
18 echo " $0 [<top_srcdir>]"
21 # unwanted scripts -- use grep -E, e.g. (aaa|bbb|ccc)
22 completion_exclude
="(nologin)"
25 completion_dir
="${top_srcdir}/bash-completion"
27 [ -d "${completion_dir}" ] || die
"not found ${completion_dir}"
29 bin_files
=$
(cd ${top_srcdir} && find * -maxdepth 0 -perm /u
+x \
31 \
! -name \
*.sh \
! -name \
*.cache \
! -name \
*.status \
32 \
! -name configure \
! -name libtool |
sort)
34 completion_files
=$
(cd ${completion_dir}/ && find * ! -name '*.am' |
sort -u)
35 completion_missing
=$
(comm -3 <(echo "$completion_files") <(echo "$bin_files"))
37 if [ -n "$completion_missing" -a -n "$completion_exclude" ]; then
38 completion_missing
=$
(echo "$completion_missing" |
grep -v -E "$completion_exclude")
41 if [ -n "$completion_missing" ]; then
42 echo "Missing completion scripts:"
43 echo "$completion_missing"