area515 / Photonic3D

Control software for resin 3D printers
http://photonic3d.com
GNU General Public License v3.0
131 stars 115 forks source link

minor improvements to start.sh #276

Closed WGAndrew closed 7 years ago

WGAndrew commented 7 years ago

Make sure script runs as root make sure script files are in unix format and runnable, even if they haven't been generated on a unix machine. [originally changed in photocentric3d/photonic3d, but proposing for main branch]

jmkao commented 7 years ago

@WGAndrew Thanks! I was just looking at your fork yesterday and marveling at all the enhancements you've made. This stability fixes look reasonable, it seems your shell scripting ability is strong :)

@WesGilster Do these changes seem reasonable to you?

WesGilster commented 7 years ago

Sure, I suppose. For the record, my opinion of dos2unix isn't great and I'm cringing that we allow a file to get the the point of deployment without being fixed, but hey I've done much worse... Recently... :)

WGAndrew commented 7 years ago

I understand why you're against it Wes - and there are other ways and means around it like setting .gitattributes to force *.sh to only use LF rather than CRLF - but I don't think it's necessarily the worst idea to ensure a build can recover itself from a simple issue.

If I wrapped dos2unix in a if grepping for carriage return in files, it would mean that dos2unix is only ran when absolutely necessary rather than my current "every time" approach. That could be better? :)

WGAndrew commented 7 years ago

I've updated that patch with a grep first - so it should now only process files that definitely need processing. 👍