Skip to content

Commit

Permalink
updated initial-setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mdorier committed Nov 22, 2023
1 parent 002c3cb commit 684d9e2
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions .github/initial-setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ def rename_files_and_directories(root, extensions,
if new_name != subdirname:
print("==> Renaming "+os.path.join(dirname, subdirname)+" into "+os.path.join(dirname, new_name))
os.system(f'git mv {os.path.join(dirname, subdirname)} {os.path.join(dirname, new_name)}')
#shutil.move(os.path.join(dirname, subdirname),
# os.path.join(dirname, new_name))
dirnames.remove(subdirname)
dirnames.append(new_name)
# rename files
Expand All @@ -70,8 +68,6 @@ def rename_files_and_directories(root, extensions,
if new_name != filename:
print("==> Renaming "+os.path.join(dirname, filename)+" into "+os.path.join(dirname, new_name))
os.system(f'git mv {os.path.join(dirname, filename)} {os.path.join(dirname, new_name)}')
#os.rename(os.path.join(dirname, filename),
# os.path.join(dirname, new_name))
break # don't try the next extension for this file


Expand All @@ -96,15 +92,13 @@ def rename_files_and_directories(root, extensions,
}
files_to_edit = list_files_to_edit('.',
extensions=['.cpp', '.h', '.hpp', '.txt', '.in', '.json'],
exclude_directories=['.git', '.github', 'build', '.spack-env', 'munit'],
exclude_files=['uthash.h'])
exclude_directories=['.git', '.github', 'build', '.spack-env'])
for f in files_to_edit:
replace_in_file(f, mapping)
rename_files_and_directories('.',
extensions=['.cpp', '.h', '.hpp', '.txt', '.in'],
mapping=mapping,
exclude_directories=['.git', '.github', 'build', '.spack-env', 'munit'],
exclude_files=['uthash.h'])
exclude_directories=['.git', '.github', 'build', '.spack-env'])
os.system('git rm .github/initial-setup.py')
os.system('git rm initial-setup.json')
os.system('git rm .github/workflows/setup.yml')
Expand Down

0 comments on commit 684d9e2

Please sign in to comment.