Skip to content

Commit e25f7ab

Browse files
authored
Merge pull request #3 from cisagov/bugfix/inplace_sed_for_everyone
Change the sed code to also work on linux
2 parents b2760ec + 53086e6 commit e25f7ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

project_setup/scripts/skeleton

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ def clone_repo(parent_repo, new_repo, org, dir=None):
6464
"Add a new remote origin for the this repository.",
6565
)
6666
run(
67-
fr"""find . \( ! -regex '.*/\.git/.*' \) -type f -print0 | """
68-
fr'''xargs -0 sed -i "" "s/{parent_repo}/{new_repo}/g"''',
67+
fr"find . \( ! -regex '.*/\.git/.*' \) -type f -exec "
68+
fr"perl -pi -e s/{parent_repo}/{new_repo}/g {{}} \;",
6969
"Search and replace repository name in source files.",
7070
)
7171
run("git add --verbose .", "Stage modified files.")

0 commit comments

Comments
 (0)