AdrienPoupa / laradose

Customizable Docker-compose template made for Laravel
46 stars 10 forks source link

fix: replace in file working on os x #3

Closed mr-feek closed 4 years ago

mr-feek commented 4 years ago

This seems to work on OS X. I'm no bash/perl expert, so please let me know what you think!

Fixes #2

AdrienPoupa commented 4 years ago

I like this. Could you maybe check if Perl is available before doing this, or running this only on OSX? https://stackoverflow.com/a/8597411/11989865

mr-feek commented 4 years ago

It was my understanding that perl should be available on the majority of linux distros since 2009 (source).

If we want to do a runtime check for operating system, we can do that but I might as well switch back to using sed, just changing the syntax depending on env. What do you think?

AdrienPoupa commented 4 years ago

You're right. I tested it and it works.

Just to be really safe, can you add a verify_command to be certain perl is there? https://github.com/AdrienPoupa/laradose/blob/master/laradose.sh#L278

mr-feek commented 4 years ago

Sure! I'll get to it later hopefully

mr-feek commented 4 years ago

hows that @AdrienPoupa ?

AdrienPoupa commented 4 years ago

Perfect, thanks!