]> Cypherpunks.ru repositories - nncp.git/blobdiff - doc/wgeter.sh
Example downloading scripts
[nncp.git] / doc / wgeter.sh
diff --git a/doc/wgeter.sh b/doc/wgeter.sh
new file mode 100755 (executable)
index 0000000..5f80d81
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh -ex
+
+name=$1-$(date '+%Y%M%d%H%m%S')
+read cmdline
+
+tmp=$(mktemp)
+wget --output-document=$tmp $cmdline
+xz -9 $tmp
+nncp-file -nice $NNCP_NICE $tmp.xz $NNCP_SENDER:$name.xz
+rm $tmp.xz