Skip to content
Snippets Groups Projects
Commit 4b53bc85 authored by Boris Feld's avatar Boris Feld
Browse files

Add a script to rename reference repos instead of rename cli

parent b29d146c
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,7 @@
../../repo-scripts/make-partial-repos ../../partial-sets.yaml ../*.benchrepo
)
rename 's/-reference//' repos/*
./repo-scripts/rename-reference-directories repos
python create_skip_file.py
......
#!/usr/bin/env python
import sys
import os
SUFFIX = "-reference"
def main(repo_dir):
for file in sorted(os.listdir(repo_dir)):
file_path = os.path.join(repo_dir, file)
if not os.path.isdir(file_path):
continue
if not file_path.endswith(SUFFIX):
continue
new_dir_path = file_path[:-len(SUFFIX)]
print("Renaming %s into %s" % (file_path, new_dir_path))
os.rename(file_path, new_dir_path)
if __name__ == "__main__":
main(sys.argv[1])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment