aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorMichael Homer <mwh@mwh.geek.nz>2014-08-15 18:56:25 +1200
committerMichael Homer <mwh@mwh.geek.nz>2014-08-15 18:58:36 +1200
commita49d775dd9d43bd22cee4c1fd3e32ede0dc2e9c2 (patch)
tree89f9da73fea2955843019af497f89efbc54c5fa3 /example
parentSet stdout to line buffered for scripting -t (diff)
downloaddragon-a49d775dd9d43bd22cee4c1fd3e32ede0dc2e9c2.tar.gz
dragon-a49d775dd9d43bd22cee4c1fd3e32ede0dc2e9c2.tar.bz2
dragon-a49d775dd9d43bd22cee4c1fd3e32ede0dc2e9c2.zip
Add simple --target example
The example downloads any URLs dragged onto the target using wget.
Diffstat (limited to 'example')
-rwxr-xr-xexample/download.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/example/download.sh b/example/download.sh
new file mode 100755
index 0000000..4698d38
--- /dev/null
+++ b/example/download.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+# This toy example uses wget and the --target mode to act
+# as a drag-and-drop download tool.
+
+../dragon --target | while read url
+do
+ wget "$url"
+done
bgstack15