Also update killer to use "-k" instead of kill `tsp -p`.
Change-Id: I8e2c61cc1b6e212fa72217cf5bc6ed1a23f2df84
test -n "${url}" || continue
echo "Processing: ${url}"
# kill currently running jobs for this url
- for i in $(tsmaster | awk -v URL="$url" '$2 ~ "running" && $0 ~ URL {print $1}'); do kill "$(tsmaster -p "$i")"; done
+ for i in $(tsmaster | awk -v URL="$url" '$2 ~ "running" && $0 ~ URL {print $1}'); do tsmaster -k "$i"; done
+ # skip url if a job is already queued
+ test -z "$(tsmaster | awk -v URL="$url" '$2 ~ "queued" && $0 ~ URL {print $1}')" || {
+ echo "download is already queued. skipping..."
+ continue
+ }
next=$((next+1))
dwn_next="${next}"
# prepare download directory