Added check to determine if host is a Mac based computer to account for 'sed' differences#80
Open
PlantDaddy wants to merge 2 commits intohak5:masterfrom
Open
Added check to determine if host is a Mac based computer to account for 'sed' differences#80PlantDaddy wants to merge 2 commits intohak5:masterfrom
PlantDaddy wants to merge 2 commits intohak5:masterfrom
Conversation
Author
|
Relates to issue #81 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently without these fixes, running create.sh on a mac wont work correctly. This is because the '-i' flag for sed on MacOS requires an extension appended to '-i' to create backup files when editing in place with sed. This is a specific quirk on Macs.
https://stackoverflow.com/questions/7573368/in-place-edits-with-sed-on-os-x
I added a function 'cleanup_mac()' to the script as well as an OS check to detect if it's a Mac based computer. When 'finish()' is run, it checks if the computer executing it was determined to be a Mac. If it was, it then runs 'cleanup_mac()' which runs a 'find' command piped to 'xargs' to delete the backup files.