diff options
author | Luke Shumaker <lukeshu@parabola.nu> | 2018-09-25 18:38:07 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@parabola.nu> | 2018-09-25 18:38:07 -0400 |
commit | d99563bd1985a402c4d94c0e611239ae8e94c22a (patch) | |
tree | 97f3c3f1c88cc2f15c6dd8886f99d524931ed749 | |
parent | 95edac20099ce435182308c1ab9f442425331659 (diff) |
make_repo_torrents: Fixparabola/20180925
-rwxr-xr-x | cron-jobs/make_repo_torrents | 8 |
1 files 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' |