mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-01-11 22:30:44 +01:00
convert to POSIX.sh / styleguide #64
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bittorf on GitHub (Feb 18, 2016).
i want to send some PullRequests for converting the whole script to POSIX sh.
this issue is just for collecting some questions and answers on this regarding style.
@bittorf commented on GitHub (Feb 18, 2016):
Q: is there a good reason why your are alway using -switch ... instead of just [ -switch ... ] ? e.g.
can be converted to
@bittorf commented on GitHub (Feb 18, 2016):
Q: why are we always enclosing var with "${var}" even when it is unneeded? every texteditor does already highlight the variables.
@lukas2511 commented on GitHub (Feb 18, 2016):
Using
[[instead of[because[[is a shell built-in while[(in theory) is a command, making the script (in theory) a bit cleaner.Using
${var}instead of$varjust as a habit and to never ever run into any problems. Also it feels good to have it consistent.@bittorf commented on GitHub (Feb 18, 2016):
@lukas2511 i'am OK with using ${var} - it's just a style issue.
@bittorf commented on GitHub (Feb 18, 2016):
@lukas2511 i understand the reason for "[[" but i'am not happy. is it OK for you when i convert them to single ones, "[[" is not defined in POSIX and this script is not about beeing very fast, but correct. (i fact most shells have 'test' aka '[' somehow builtin ...)
@lukas2511 commented on GitHub (Feb 21, 2016):
@bittorf yes, i would be okay with that if you can work out the other stuff to make it posix compatible.
@bittorf commented on GitHub (Feb 22, 2016):
ok, i will start to send small pullrequests...
@166MMX commented on GitHub (May 13, 2016):
I have been playing around with Travis CI and ShellCheck. Maybe it is some sort of help for you guys.
I am new to Travis CI that's why I replaced the content of the yaml file. Not sure how to integrate that into your existing one though.
@lukas2511 commented on GitHub (Jun 4, 2016):
I'm closing this ticket now. Doesn't look like anybody is working on this and I don't really have a personal interest at doing this migration. If somebody still wants letsencrypt.sh to be POSIX sh compatible please feel free to open pull-requests.