diff options
author | Stefan Behnel <scoder@users.berlios.de> | 2008-07-12 09:13:05 +0200 |
---|---|---|
committer | Stefan Behnel <scoder@users.berlios.de> | 2008-07-12 09:13:05 +0200 |
commit | cf8f78c8bd7bcc85903e53d6debe229d06cfb521 (patch) | |
tree | f3fcf65fa1044c8da5e51d9c72d3b45b91e77bb1 /bin | |
parent | df65309fd67c1bbf519dfb5d5ae8658163264dac (diff) | |
download | cython-cf8f78c8bd7bcc85903e53d6debe229d06cfb521.tar.gz |
removed unused script
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/update_references | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/bin/update_references b/bin/update_references deleted file mode 100755 index 702777813..000000000 --- a/bin/update_references +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env python -# -# Go through the Tests directory and its subdirectories -# copying the latest versions of the test outputs into -# the Reference directories. -# - -import os, sys - -ignore_names = [".DS_Store", "Icon\r"] - -def copy_file(from_path, to_path): - # We copy the contents from one file to the other - # so as to preserve metadata on the Mac. - #print from_path, "-->", to_path - f = open(from_path) - g = open(to_path, "w+") - g.write(f.read()) - f.close() - g.close() - -def update_references(out_dir, ref_dir): - for name in os.listdir(ref_dir): - if name not in ignore_names: - out_file = os.path.join(out_dir, name) - ref_file = os.path.join(ref_dir, name) - if os.path.isfile(out_file): - print "Updating", name - copy_file(out_file, ref_file) - -def update_references_in_dir(dir): - print "Updating references in", dir - for name in os.listdir(dir): - if name <> "Reference" and not name.startswith("("): - item_path = os.path.join(dir, name) - if os.path.isdir(item_path): - update_references_in_dir(item_path) - ref_dir = os.path.join(dir, "Reference") - if os.path.isdir(ref_dir): - update_references(dir, ref_dir) - -def main(): - bin_dir = os.path.dirname(sys.argv[0]) - source_dir = os.path.dirname(bin_dir) - tests_dir = os.path.join(source_dir, "Tests") - update_references_in_dir(tests_dir) - -if __name__ == "__main__": - main() |