Skip to content

Conversation

@jsf9k
Copy link
Member

@jsf9k jsf9k commented Jul 5, 2019

sed -i only works on linux, and sed -i "" only works on OSX, but both linux and OSX can use perl to execute an in-place regex. (Any port in a storm, I suppose.)

I also simplified the code to use the simpler find -exec idiom, instead of the more complicated find -print0 | xargs idiom.

jsf9k added 2 commits July 5, 2019 16:56
sed -i only works on linux, and sed -i "" only works on OSX, but both
linux and OSX can use perl to execute an in-place regex.  (Any port in
a storm, I suppose.)

I also simplified the code to use find -exec instead of find -print0 |
xargs.
@jsf9k jsf9k requested review from a team, KyleEvers, dav3r, felddy and mcdonnnj July 5, 2019 21:08
@jsf9k jsf9k self-assigned this Jul 5, 2019
Copy link
Contributor

@felddy felddy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified that this still works on the 🍎

Good improvement.

run(
f"find . \( ! -regex '.*/\.git/.*' \) -type f -exec "
f'perl -pi -e s/{parent_repo}/{new_repo}/g {{}} \;',
fr"find . \( ! -regex '.*/\.git/.*' \) -type f -exec "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You know it's serious when the fr strings come out to play.

Copy link
Member

@dav3r dav3r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The things we do to coexist... 👍 Nice changes.

@jsf9k jsf9k merged commit e25f7ab into develop Jul 8, 2019
@jsf9k jsf9k deleted the bugfix/inplace_sed_for_everyone branch July 8, 2019 12:20
dv4harr10 added a commit that referenced this pull request Mar 4, 2024
Redo changes to formatting to reflect what the
user should expect to see in terminal output.
jsf9k pushed a commit that referenced this pull request Mar 7, 2024
Redo changes to formatting to reflect what the
user should expect to see in terminal output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants