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"
# 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