diff options
author | B. Watson <yalhcru@gmail.com> | 2017-02-15 17:39:04 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2017-02-18 07:54:16 +0700 |
commit | f100798b1edee866c3679b1c1a4b84b578f02bd4 (patch) | |
tree | f6bfc6cf2828df72574a2af310da46917dcb9793 /system/man-db/doinst.sh | |
parent | 720d6700bb27e710ea48f1f577ead4bec40ca538 (diff) | |
download | slackbuilds-f100798b1edee866c3679b1c1a4b84b578f02bd4.tar.gz |
system/man-db: Updated for version 2.7.6.1.
Diffstat (limited to 'system/man-db/doinst.sh')
-rw-r--r-- | system/man-db/doinst.sh | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/system/man-db/doinst.sh b/system/man-db/doinst.sh index 4478281966..cb474322c8 100644 --- a/system/man-db/doinst.sh +++ b/system/man-db/doinst.sh @@ -14,6 +14,16 @@ config() { config etc/man_db.conf.new +# In English, the if/find below means "only run the database creation if +# it was last done over an hour ago". This is needed because upgradepkg +# runs doinst.sh twice, but I don't want the 10+ minute long database +# creation to happen twice on upgrade (or at all, when I'm repeatedly +# reinstalling man-db for testing purposes). + +if \ + [ ! -e /var/cache/man/man-db ] || \ + [ -n "$( find var/cache/man/ -type d -a -name man-db -a -mmin +60 )" ] +then # Generate the initial man database (or rebuild it if it exists). # We want to skip this step if installing somewhere besides / (e.g. with # the -root option or ROOT env variable set for installpkg), hence the @@ -29,9 +39,10 @@ config etc/man_db.conf.new # the 2>/dev/null was added for 2.7.6 because it complains about # missing CACHEDIR.TAG files... which don't matter, because we've # got NOCACHE in the config file. -( \ - [ -x /bin/readlink ] && \ - [ "$( /bin/readlink -f $( pwd ) )" = "/" ] && \ - ( [ -x /opt/man-db/bin/mandb ] && /opt/man-db/bin/mandb -c -q ) || \ - ( [ -x /usr/bin/mandb ] && /usr/bin/mandb -c -q ) \ -) 2>/dev/null + ( \ + [ -x /bin/readlink ] && \ + [ "$( /bin/readlink -f $( pwd ) )" = "/" ] && \ + ( [ -x /opt/man-db/bin/mandb ] && /opt/man-db/bin/mandb -c -q ) || \ + ( [ -x /usr/bin/mandb ] && /usr/bin/mandb -c -q ) \ + ) 2>/dev/null +fi |