10 if [ -z "$scriptname" ]; then
11 echo "Run with a fetch script as an argument:"
12 (cd fetch-scripts && ls)
16 if ! [ -e fetch-scripts/"$scriptname" ]; then
17 echo "Unknown fetch script $scriptname"
21 date +"Starting $scriptname: %c"
23 #NB: -r is number of retries, at 8 second intervals
24 if lockfile -r 900 "$MIRRORDIR/.locks/$scriptname"; then
25 date +"Received lock: %c"
26 (. fetch-scripts/"$scriptname") && :
28 rm -f "$MIRRORDIR/.locks/$scriptname"