Skip to content

Commit

Permalink
hooks: do not update manual index cache if directory does not exist a…
Browse files Browse the repository at this point in the history
…nymore

otherwise we get this error:

ls: cannot access /tmp/example-1.0/share/man/: No such file or directory
updating manual index cache for /tmp/example-1.0/share/man ..
  • Loading branch information
Matthias Ruester authored and mariux committed Jun 1, 2015
1 parent 7924a2f commit 4e42f4a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hooks/mandb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ for man_dir in $(beeuniq ${man_dirs//:/ }) ; do
case "${action}" in
"post-remove"|"post-install")
if grep -q "file=${man_dir}" ${content} ; then
if [ ! -d ${man_dir} ]; then
continue
fi

nfiles=$(ls ${man_dir}/ | head -2 | grep -c -v index.db)
if [ "${nfiles}" -gt 0 ] ; then
rm -f ${man_dir}/index.db
Expand Down

0 comments on commit 4e42f4a

Please sign in to comment.