summary refs log tree commit diff
path: root/maintainers
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-03-09 17:53:04 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-03-09 17:53:04 +0000
commit6552ea2ddbeb5e8241555f9bc8d52fedc82384a4 (patch)
tree7b78c98bcb325bef34198c8110d20d839e5011ab /maintainers
parenta736ed4e663852af46bb2092d592e57c40907853 (diff)
downloadnixpkgs-6552ea2ddbeb5e8241555f9bc8d52fedc82384a4.tar
nixpkgs-6552ea2ddbeb5e8241555f9bc8d52fedc82384a4.tar.gz
nixpkgs-6552ea2ddbeb5e8241555f9bc8d52fedc82384a4.tar.bz2
nixpkgs-6552ea2ddbeb5e8241555f9bc8d52fedc82384a4.tar.lz
nixpkgs-6552ea2ddbeb5e8241555f9bc8d52fedc82384a4.tar.xz
nixpkgs-6552ea2ddbeb5e8241555f9bc8d52fedc82384a4.tar.zst
nixpkgs-6552ea2ddbeb5e8241555f9bc8d52fedc82384a4.zip
svn path=/nixpkgs/trunk/; revision=32961
Diffstat (limited to 'maintainers')
-rwxr-xr-xmaintainers/scripts/copy-tarball.sh21
-rwxr-xr-xmaintainers/scripts/copy-tarballs.sh1
2 files changed, 16 insertions, 6 deletions
diff --git a/maintainers/scripts/copy-tarball.sh b/maintainers/scripts/copy-tarball.sh
index 9070977d7ce..b4c2e93dab1 100755
--- a/maintainers/scripts/copy-tarball.sh
+++ b/maintainers/scripts/copy-tarball.sh
@@ -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"
 
diff --git a/maintainers/scripts/copy-tarballs.sh b/maintainers/scripts/copy-tarballs.sh
index c1ed9039191..80aeef9d66d 100755
--- a/maintainers/scripts/copy-tarballs.sh
+++ b/maintainers/scripts/copy-tarballs.sh
@@ -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