aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2020-11-02 18:51:54 -0300
committerSilvio Rhatto <rhatto@riseup.net>2020-11-02 18:51:54 -0300
commit4d4d59ec701a6944810753eadc92385c79b7a7db (patch)
tree6791d765f22d91e1783626c2d4ebc0bb735f2840
parent98d4204ef95a5e60d97e6e2a293f138b5ca99d13 (diff)
downloadscripts-4d4d59ec701a6944810753eadc92385c79b7a7db.tar.gz
scripts-4d4d59ec701a6944810753eadc92385c79b7a7db.tar.bz2
Feat: show: do not refresh file list automatically
-rwxr-xr-xshow10
1 files changed, 6 insertions, 4 deletions
diff --git a/show b/show
index 86ece43..3db4ac5 100755
--- a/show
+++ b/show
@@ -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