diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2020-11-02 18:51:54 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2020-11-02 18:51:54 -0300 |
commit | 4d4d59ec701a6944810753eadc92385c79b7a7db (patch) | |
tree | 6791d765f22d91e1783626c2d4ebc0bb735f2840 | |
parent | 98d4204ef95a5e60d97e6e2a293f138b5ca99d13 (diff) | |
download | scripts-4d4d59ec701a6944810753eadc92385c79b7a7db.tar.gz scripts-4d4d59ec701a6944810753eadc92385c79b7a7db.tar.bz2 |
Feat: show: do not refresh file list automatically
-rwxr-xr-x | show | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -21,6 +21,8 @@ function __update_filelist { if [ -z "$ITEM" ]; then echo "usage: $BASENAME <item-name>" exit 1 +elif [ "$ITEM" == "refresh" ]; then + __update_filelist elif [ ! -d "$DOCS" ]; then echo "missing $DOCS folder" exit 1 @@ -34,10 +36,10 @@ else CHANGED="`stat --printf='%Y\n' $LIST`" fi -# Refresh lists older than $MAX_AGE -if ((($DATE - $CHANGED) >= $MAX_AGE)); then - __update_filelist -fi +# Automatically refresh lists older than $MAX_AGE +#if ((($DATE - $CHANGED) >= $MAX_AGE)); then +# __update_filelist +#fi # Dispatch #find $DOCS -iname "*$ITEM*" | head -1 | while read entry; do xdg-open "$entry"; done |