svn path=/nixpkgs/trunk/; revision=32961

This commit is contained in:
Eelco Dolstra 2012-03-09 17:53:04 +00:00
parent a736ed4e66
commit 6552ea2ddb
2 changed files with 16 additions and 6 deletions

View file

@ -3,6 +3,7 @@
distDir=/data/webserver/tarballs
url="$1"
file="$2"
if [ -z "$url" ]; then echo "syntax: $0 URL"; exit 0; fi
base="$(basename "$url")"
@ -11,15 +12,23 @@ dstPath="$distDir/$base"
if [ -e "$dstPath" ]; then echo "$dstPath already exists"; exit 0; fi
echo "downloading $url to $newPath"
if [ -z "$file" ]; then
if [ -n "$dryRun" ]; then exit 0; fi
echo "downloading $url to $dstPath"
declare -a res
if ! res=($(PRINT_PATH=1 nix-prefetch-url "$url")); then
continue
if [ -n "$dryRun" ]; then exit 0; fi
declare -a res
if ! res=($(PRINT_PATH=1 nix-prefetch-url "$url")); then
continue
fi
storePath=${res[1]}
else
storePath="$file"
fi
storePath=${res[1]}
cp $storePath "$dstPath.tmp.$$"
mv -f "$dstPath.tmp.$$" "$dstPath"

View file

@ -8,6 +8,7 @@ urls=$(nix-instantiate --eval-only --xml --strict '<nixpkgs/maintainers/scripts/
for url in $urls; do
if echo "$url" | grep -q -E "www.cs.uu.nl|nixos.org|.stratego-language.org|java.sun.com|ut2004|linuxq3a|RealPlayer|Adbe|belastingdienst|microsoft|armijn/.nix|sun.com|archive.eclipse.org"; then continue; fi
if ! echo "$url" | grep -q -E "\-.*[0-9].*"; then echo "skipping $url"; continue; fi
$(dirname $0)/copy-tarball.sh "$url"
done