about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra2006-01-30 16:20:35 +0000
committerEelco Dolstra2006-01-30 16:20:35 +0000
commit816cb778897f9d3165b48b6218596d5d39e8d48f (patch)
treea46588a1ff8da46c335f9a570642073ae867f80f
parent4e684bbf5ace2f29c1d8591d1e602473b2075220 (diff)
* Updated URL.
svn path=/nixpkgs/trunk/; revision=4626
-rwxr-xr-xmaintainers/scripts/evacuate-urls.sh26
1 files changed, 17 insertions, 9 deletions
diff --git a/maintainers/scripts/evacuate-urls.sh b/maintainers/scripts/evacuate-urls.sh
index 11dcd9227912..d2d611352d8a 100755
--- a/maintainers/scripts/evacuate-urls.sh
+++ b/maintainers/scripts/evacuate-urls.sh
@@ -6,19 +6,27 @@ find . -name "*.nix" | while read fn; do
 
         if oldURL=$(echo "$line" | sed 's^url = \(.*\);^\1^'); then
 
-            if ! echo "$oldURL" | grep -q -E ".cs.uu.nl|.stratego-language.org|java.sun.com|ut2004|linuxq3a|RealPlayer|Adbe"; then
+            if ! echo "$oldURL" | grep -q -E "www.cs.uu.nl|nix.cs.uu.nl|.stratego-language.org|java.sun.com|ut2004|linuxq3a|RealPlayer|Adbe"; then
                 base=$(basename $oldURL)
-                newURL="http://catamaran.labs.cs.uu.nl/dist/tarballs/$base"
-                newPath="/mnt/scratchy/eelco/public_html/tarballs/$base"
+                newURL="http://nix.cs.uu.nl/dist/tarballs/$base"
+                newPath="/data/webserver/dist/tarballs/$base"
                 echo "$fn: $oldURL -> $newURL"
 
-                if ! test -e "$newPath"; then
-                    curl --fail --location --max-redirs 20 "$oldURL" > "$newPath".tmp
-                    mv -f "$newPath".tmp "$newPath"
-                fi
+#		if test -e "$newPath"; then
+#		    echo "WARNING: $newPath exists!"
+#		else
+
+		    if ! test -e "$newPath"; then
+			curl --fail --location --max-redirs 20 "$oldURL" > "$newPath".tmp
+			mv -f "$newPath".tmp "$newPath"
+
+		    fi
+
+		    sed "s^$oldURL^$newURL^" < "$fn" > "$fn".tmp
+		    mv -f "$fn".tmp "$fn"
+
+#		fi
 
-                sed "s^$oldURL^$newURL^" < "$fn" > "$fn".tmp
-                mv -f "$fn".tmp "$fn"
             fi
             
         fi