From db2ea03e53a3aed1c8350811be70a31c7ea0ef53 Mon Sep 17 00:00:00 2001 From: Joseph Graham Date: Sun, 27 Jul 2014 11:55:08 +0100 Subject: Added new file --- make_individual_torrent | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 make_individual_torrent (limited to 'make_individual_torrent') diff --git a/make_individual_torrent b/make_individual_torrent new file mode 100644 index 0000000..0cfee56 --- /dev/null +++ b/make_individual_torrent @@ -0,0 +1,44 @@ +#! /bin/bash +# Copyright (C) 2014 Joseph Graham +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# This script is called by `make_repo_torrents' to make a torrent. It +# depends on `mktorrent'. It takes the following arg: +# $1 - path of package + +# Comma seperated list of trackers, no spaces +# t67.eu is run by Xylon, hackcoop by fauno & friends +trackers='http://t67.eu:6969/announce,http://tracker.hackcoop.com.ar/announce' + +# This mirror is put as a webseed. Which mirror we use for a webseed +# doesn't really matter since it's re-written on the client machine by +# pacman2pacman so it won't normally be used anyway. +seed_url='http://repo.parabolagnulinux.org/' + +if [[ -z "${1}" ]] +then + echo "Error. First arg must be the path of the package." + echo 1 +fi + +pkg="${1}" + +pkg_name="${pkg##*/}" + +# URL of the actual package for the webseed +webseed="${seed_url}${pkg#${public_location}}" + +mktorrent -a "${trackers}" "${pkg}" -w "${webseed}" >/dev/null || +echo "Error making torrent for \"${pkg}\"" -- cgit v1.2.3-2-g168b From 6790ac43f2f79fea6adcfef2a10d3c4105574216 Mon Sep 17 00:00:00 2001 From: Joseph Graham Date: Sun, 27 Jul 2014 12:07:06 +0100 Subject: fixed loads of mistakes I make --- make_individual_torrent | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'make_individual_torrent') diff --git a/make_individual_torrent b/make_individual_torrent index 0cfee56..e5b7d8c 100644 --- a/make_individual_torrent +++ b/make_individual_torrent @@ -15,8 +15,9 @@ # along with this program. If not, see . # This script is called by `make_repo_torrents' to make a torrent. It -# depends on `mktorrent'. It takes the following arg: +# depends on `mktorrent'. It takes the following args: # $1 - path of package +# $2 - public location # Comma seperated list of trackers, no spaces # t67.eu is run by Xylon, hackcoop by fauno & friends @@ -33,7 +34,14 @@ then echo 1 fi +if [[ -z "${2}" ]] +then + echo "Error. Second arg must be the public location." + echo 1 +fi + pkg="${1}" +public_location="${2}" pkg_name="${pkg##*/}" -- cgit v1.2.3-2-g168b From 5e9c23a6cc430138358c97544b1a9219d643b6a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Mas=C5=82owski?= Date: Tue, 30 Sep 2014 21:18:41 +0200 Subject: Fix make_repo_torrents for the new server. --- make_individual_torrent | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 make_individual_torrent (limited to 'make_individual_torrent') diff --git a/make_individual_torrent b/make_individual_torrent old mode 100644 new mode 100755 -- cgit v1.2.3-2-g168b From d0834f7e6bd53ea729374eab138bb38a36c73996 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 20 May 2015 20:41:17 -0600 Subject: Clean up shebangs --- make_individual_torrent | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'make_individual_torrent') diff --git a/make_individual_torrent b/make_individual_torrent index e5b7d8c..0a7e778 100755 --- a/make_individual_torrent +++ b/make_individual_torrent @@ -1,4 +1,4 @@ -#! /bin/bash +#!/bin/bash # Copyright (C) 2014 Joseph Graham # # This program is free software: you can redistribute it and/or modify -- cgit v1.2.3-2-g168b