diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2017-06-15 22:33:22 -0400 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2017-06-15 22:43:15 -0400 |
commit | c65d21ae38bdfb646af991a5f3b1dfe8e41a5318 (patch) | |
tree | 4012d43fe3089a007064788b8b29583c32de92c4 | |
parent | 9e4ae57ab160241ab0521177b570096089742780 (diff) | |
download | cbt-c65d21ae38bdfb646af991a5f3b1dfe8e41a5318.tar.gz cbt-c65d21ae38bdfb646af991a5f3b1dfe8e41a5318.tar.bz2 cbt-c65d21ae38bdfb646af991a5f3b1dfe8e41a5318.zip |
warn on empty loop file (as seen) and sort loop files for debugging
-rwxr-xr-x | cbt | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -315,11 +315,16 @@ while true; do done files= if [ -f "$CBT_LOOP_FILE" ]; then - files=($(cat "$CBT_LOOP_FILE")) + files=($(sort "$CBT_LOOP_FILE")) #rm "$CBT_LOOP_FILE" fi echo "" echo "Watching for file changes... (ctrl+c short press for loop, long press for abort)" + for file in "${files[@]}"; do + if [ $file == "" ]; then + echo "warning: empty file found in loop file list" 1>&2 + fi + done fswatch --one-event "${files[@]}" fi done |