diff options
Diffstat (limited to 'file_hooks')
-rw-r--r-- | file_hooks/.gitignore | 5 | ||||
-rwxr-xr-x | file_hooks/examples/save_to_file.clj | 3 | ||||
-rwxr-xr-x | file_hooks/examples/save_to_file.rb | 3 |
3 files changed, 11 insertions, 0 deletions
diff --git a/file_hooks/.gitignore b/file_hooks/.gitignore new file mode 100644 index 00000000000..e4ccdc9e2ec --- /dev/null +++ b/file_hooks/.gitignore @@ -0,0 +1,5 @@ +* +!*/ +!.gitignore +!.gitkeep +!examples/* diff --git a/file_hooks/examples/save_to_file.clj b/file_hooks/examples/save_to_file.clj new file mode 100755 index 00000000000..a59d83749d3 --- /dev/null +++ b/file_hooks/examples/save_to_file.clj @@ -0,0 +1,3 @@ +#!/usr/bin/env clojure +(let [in (slurp *in*)] + (spit "/tmp/clj-data.txt" in)) diff --git a/file_hooks/examples/save_to_file.rb b/file_hooks/examples/save_to_file.rb new file mode 100755 index 00000000000..61b0df9bfd6 --- /dev/null +++ b/file_hooks/examples/save_to_file.rb @@ -0,0 +1,3 @@ +#!/usr/bin/env ruby +x = STDIN.read +File.write('/tmp/rb-data.txt', x) |