summary refs log tree commit diff
path: root/src/etc
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2011-12-13 10:54:48 -0800
committerGraydon Hoare <graydon@mozilla.com>2011-12-13 10:54:48 -0800
commit548fe0eda9200104e39ad3ec5fcb9e0ea7e643a0 (patch)
tree8f82d68855110e3e8da49517250830b0a9098e3d /src/etc
parent1c1bc2f1cde93a27dbee690280ee81fde8b2ceeb (diff)
downloadrust-548fe0eda9200104e39ad3ec5fcb9e0ea7e643a0.tar.gz
rust-548fe0eda9200104e39ad3ec5fcb9e0ea7e643a0.zip
Register new snapshots and teach snapshot script to deal with extracting new-style versioned snapshots.
Diffstat (limited to 'src/etc')
-rwxr-xr-xsrc/etc/get-snapshot.py24
1 files changed, 3 insertions, 21 deletions
diff --git a/src/etc/get-snapshot.py b/src/etc/get-snapshot.py
index b42a76350d9..1b314a049d9 100755
--- a/src/etc/get-snapshot.py
+++ b/src/etc/get-snapshot.py
@@ -3,34 +3,16 @@
 import os, tarfile, hashlib, re, shutil, sys
 from snapshot import *
 
-old_snapshot_files = {
-    "linux": ["bin/rustc",
-              "lib/libcore.so",
-              "lib/libruststd.so",
-              "lib/librustrt.so",
-              "lib/librustllvm.so"],
-    "macos": ["bin/rustc",
-              "lib/libcore.dylib",
-              "lib/libruststd.dylib",
-              "lib/librustrt.dylib",
-              "lib/librustllvm.dylib"],
-    "winnt": ["bin/rustc.exe",
-              "lib/core.dll",
-              "lib/ruststd.dll",
-              "lib/rustrt.dll",
-              "lib/rustllvm.dll"]
-    }
-
 def unpack_snapshot(triple, snap):
   dl_path = os.path.join(download_dir_base, snap)
   print("opening snapshot " + dl_path)
   tar = tarfile.open(dl_path)
   kernel = get_kernel(triple)
-  for name in old_snapshot_files[kernel]:
-    p = "rust-stage0/" + name
+  for p in tar.getnames():
+    name = p.replace("rust-stage0/", "", 1);
     stagep = os.path.join(triple, "stage0")
     fp = os.path.join(stagep, name)
-    print("extracting " + fp)
+    print("extracting " + p)
     tar.extract(p, download_unpack_base)
     tp = os.path.join(download_unpack_base, p)
     shutil.move(tp, fp)