Skip to content

Commit

Permalink
fix: remove .bak files
Browse files Browse the repository at this point in the history
Linux vs OSX handling sed differently for edit in place.
this cleans up the .bak files
  • Loading branch information
johnmcguin committed Aug 19, 2024
1 parent 645ab59 commit 1a967a0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/new_site.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ program
await execP(
`grep -rl 'Job Title' "sites/${dir}/" | xargs sed -i.bak "s/Job Title/${job}/g"`
);
/**
* Remove the .bak files that sed had to create (workaround for
* OSX vs Linux differences in sed behavior
* */
await execP('find . -type f -name "*.bak" | xargs rm');
renameCopyJob.succeed("Renamed the copy");

/**
Expand Down

0 comments on commit 1a967a0

Please sign in to comment.