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 --- cron-jobs/make_repo_torrents | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cron-jobs') diff --git a/cron-jobs/make_repo_torrents b/cron-jobs/make_repo_torrents index c94d073..a5d72a5 100755 --- a/cron-jobs/make_repo_torrents +++ b/cron-jobs/make_repo_torrents @@ -46,6 +46,8 @@ do find "${dir}" -name '*\.pkg\.tar\.xz' | while read pkg do + pkg_name="${pkg##*/}" + if [[ -h "${pkg}" ]] # check if it's a symbolic link then # We get the target of the symlink @@ -56,7 +58,7 @@ do # `make_individual_torrent' to make it. if ! [[ -f "${torrent_location}${pkg_name}.torrent" ]] then - /srv/http/repo/dbscripts/make_individual_torrent "${pkg}" + /srv/http/repo/dbscripts/make_individual_torrent "${pkg}" "${public_location}" fi done done -- cgit v1.2.3