From ee19b41203a75aabaafa8093f3b6ef487a9febc8 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 15 Jan 2013 11:18:42 +0100 Subject: Update the tarball mirroring scripts --- maintainers/scripts/copy-tarball.sh | 10 +++++----- maintainers/scripts/copy-tarballs.sh | 14 +++++++++++++- 2 files changed, 18 insertions(+), 6 deletions(-) (limited to 'maintainers/scripts') diff --git a/maintainers/scripts/copy-tarball.sh b/maintainers/scripts/copy-tarball.sh index b4c2e93dab17..de325120efc8 100755 --- a/maintainers/scripts/copy-tarball.sh +++ b/maintainers/scripts/copy-tarball.sh @@ -10,25 +10,25 @@ base="$(basename "$url")" if [ -z "$base" ]; then echo "bad URL"; exit 1; fi dstPath="$distDir/$base" -if [ -e "$dstPath" ]; then echo "$dstPath already exists"; exit 0; fi +if [ -e "$dstPath" ]; then if [ -n "$VERBOSE" ]; then echo "$dstPath already exists"; fi; exit 0; fi if [ -z "$file" ]; then echo "downloading $url to $dstPath" - if [ -n "$dryRun" ]; then exit 0; fi + if [ -n "$DRY_RUN" ]; then exit 0; fi declare -a res if ! res=($(PRINT_PATH=1 nix-prefetch-url "$url")); then - continue + exit fi - + storePath=${res[1]} else storePath="$file" fi - + cp $storePath "$dstPath.tmp.$$" mv -f "$dstPath.tmp.$$" "$dstPath" diff --git a/maintainers/scripts/copy-tarballs.sh b/maintainers/scripts/copy-tarballs.sh index 80aeef9d66de..b25326d1af32 100755 --- a/maintainers/scripts/copy-tarballs.sh +++ b/maintainers/scripts/copy-tarballs.sh @@ -8,7 +8,19 @@ urls=$(nix-instantiate --eval-only --xml --strict '