summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@parabola.nu>2018-09-25 18:38:07 -0400
committerLuke Shumaker <lukeshu@parabola.nu>2018-09-25 18:38:07 -0400
commitd99563bd1985a402c4d94c0e611239ae8e94c22a (patch)
tree97f3c3f1c88cc2f15c6dd8886f99d524931ed749
parent95edac20099ce435182308c1ab9f442425331659 (diff)
make_repo_torrents: Fixparabola/20180925
-rwxr-xr-xcron-jobs/make_repo_torrents8
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'