aboutsummaryrefslogtreecommitdiff
path: root/utilities/gen-magnet.sh
diff options
context:
space:
mode:
Diffstat (limited to 'utilities/gen-magnet.sh')
-rwxr-xr-xutilities/gen-magnet.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/utilities/gen-magnet.sh b/utilities/gen-magnet.sh
new file mode 100755
index 0000000..d48d323
--- /dev/null
+++ b/utilities/gen-magnet.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+# Usage:
+# ./generate-magnet.sh <url> <license-identifier>
+# e.g.
+# ./generate-magnet.sh https://www.gnu.org/licenses/agpl-3.0.txt agpl-3.0
+
+wget "$1" -O "$2.txt" && transmission-create "$2.txt" -o "$2.txt.torrent" && transmission-show -m "$2.txt.torrent" && rm "$2.txt" "$2.txt.torrent"