list_files and cache in ~u2001/.meta/files
authorDobrica Pavlinusic <dpavlin@rsync1.maxxo.com>
Wed, 11 Apr 2012 16:52:58 +0000 (18:52 +0200)
committerDobrica Pavlinusic <dpavlin@rsync1.maxxo.com>
Wed, 11 Apr 2012 16:52:58 +0000 (18:52 +0200)
gearman/list_files [new file with mode: 0755]

diff --git a/gearman/list_files b/gearman/list_files
new file mode 100755 (executable)
index 0000000..ff11c69
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+while read path ; do
+       if [ -e $path/.meta/files ] ; then
+               cat $path/.meta/files
+       else
+               find -L $path -printf "%y %s %p\n" | tee $path/.meta/files
+       fi
+done