send_file gearman API
authorDobrica Pavlinusic <dpavlin@rsync1>
Tue, 15 Nov 2011 17:33:40 +0000 (18:33 +0100)
committerDobrica Pavlinusic <dpavlin@rsync1>
Tue, 15 Nov 2011 17:33:40 +0000 (18:33 +0100)
gearman/send_file [new file with mode: 0755]

diff --git a/gearman/send_file b/gearman/send_file
new file mode 100755 (executable)
index 0000000..a8fd821
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+IFS='#'
+while read from to ; do
+       target_dir=`dirname $to`
+
+       if [ ! -e $target_dir ] ; then
+               eval mkdir -p $target_dir
+       fi
+
+       eval ln -v $from $to
+done