]> gitweb.fluxo.info Git - scripts.git/commitdiff
Fix: show --watch: inotifywait params
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 15 Apr 2021 22:30:38 +0000 (19:30 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 15 Apr 2021 22:30:38 +0000 (19:30 -0300)
show

diff --git a/show b/show
index 219570252456aeeb6294b3ec523069fc1758f6f1..2815aad57cd258ef2130e2f8a3a8c0b17dabf9d4 100755 (executable)
--- a/show
+++ b/show
@@ -61,13 +61,11 @@ if [ "$ITEM" == "--search" ]; then
   shift
   grep -i -- "$*" $LIST
 elif [ "$ITEM" == "--watch" ]; then
-  (
-    cd $DOCS
-
-    while inotifywait -e modify -e create -e move -e delete .; do
-      $PROGRAM --refresh
-    done
-  )
+  # Convert symlink to full path and start inotifywait loop
+  #while inotifywait -e modify -e create -e move -e delete -r "`readlink -f $DOCS`"; do
+  while inotifywait -e modify -e move -r "`readlink -f $DOCS`"; do
+    $PROGRAM --refresh
+  done
 else
   grep -i -- "$ITEM" $LIST | while read entry; do
     echo "Opening $entry..."