diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2020-12-06 09:18:55 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2020-12-06 09:18:55 -0300 |
commit | e704891a1caf50e744bdbf61e09f205130bfc87f (patch) | |
tree | b8459f200d2e79758068a0a75e2fef31d1a244d5 | |
parent | 81a004961db88d74b01dab2ef723b54d1c10d1e5 (diff) | |
download | scripts-e704891a1caf50e744bdbf61e09f205130bfc87f.tar.gz scripts-e704891a1caf50e744bdbf61e09f205130bfc87f.tar.bz2 |
Fix: show: restrict filelist to some file extensions
-rwxr-xr-x | show | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -7,6 +7,8 @@ BASENAME="`basename $0`" DOCS="$HOME/data/doc" LIST="$DOCS/.filelist" +DOC_PATTERN=".*\.(txt|doc|docx|rtf|pdf|sxc|csv|odt|odf|ods|xls|xlsx|ppt|epub|mobi|djvu|lit)" +FIND_OPTS="-not -path '*.git*' -regextype posix-egrep -iregex" ITEM="$1" DATE="`date +%s`" MAX_AGE="86400" @@ -14,7 +16,7 @@ MAX_AGE="86400" # Update the filelist function __update_filelist { echo "Generating new filelist..." - cd $DOCS && find . -not -path '*.git*' > $LIST + cd $DOCS && find . $FIND_OPTS "$DOC_PATTERN" > $LIST } # Check |