From d99563bd1985a402c4d94c0e611239ae8e94c22a Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 25 Sep 2018 18:38:07 -0400 Subject: make_repo_torrents: Fix --- cron-jobs/make_repo_torrents | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cron-jobs/make_repo_torrents b/cron-jobs/make_repo_torrents index 3da4556..5182b8f 100755 --- a/cron-jobs/make_repo_torrents +++ b/cron-jobs/make_repo_torrents @@ -22,12 +22,12 @@ # so it's OK to just stuff all the torrents into a single directory. set -eE +shopt -s extglob globstar nullglob . "$(dirname "$(readlink -e "$0")")/../config" . "$(dirname "$(readlink -e "$0")")/../torrent.conf" -. "$(dirname "$(readlink -e "$0")")/../db-functions" +. "$(librelib messages)" mkdir -p -- "${FTP_BASE}/${TORRENTPOOL}" -cd "${FTP_BASE}/${TORRENTPOOL}" IFS=, # for ${TRACKERS[*]} and ${WEBSEEDS[*]} @@ -44,7 +44,7 @@ make_torrent() { if [[ -L "$pkgfile" ]]; then target=$(readlink -- "$pkgfile") - make_torrent "$target" + make_torrent "${pkgfile%/*}/${target}" ln -sT -- "${target}.torrent" "${pkgfile}.torrent" else # Create the .torrent @@ -64,6 +64,8 @@ make_torrent() { fi } +msg 'Creating .torrent files...' for pkgfile in "$FTP_BASE"/*/os/*/*${PKGEXTS}; do make_torrent "$pkgfile" done +msg 'Done' -- cgit v1.2.2