]> gitweb.fluxo.info Git - scripts.git/commitdiff
Feat: show: do not refresh file list automatically
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 2 Nov 2020 21:51:54 +0000 (18:51 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 2 Nov 2020 21:51:54 +0000 (18:51 -0300)
show

diff --git a/show b/show
index 86ece43446827661790056094aa10280cc7f130a..3db4ac5d17f0cbd2c816b69755d73aa455f99e33 100755 (executable)
--- 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