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.
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.
Q: is there a good reason why your are alway using -switch ... instead of just [ -switch ... ] ? e.g.
if [[ ! "${retcode}" = "0" ]] &&
can be converted to
[ $retcode -eq 0 ] || ...
@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.
```
if [[ ! "${retcode}" = "0" ]] &&
```
can be converted to
```
[ $retcode -eq 0 ] || ...
```
Q: why are we always enclosing var with "${var}" even when it is unneeded? every texteditor does already highlight the variables.
@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.
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 $var just as a habit and to never ever run into any problems. Also it feels good to have it consistent.
@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 `$var` just as a habit and to never ever run into any problems. Also it feels good to have it consistent.
@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 ...)
@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 ...)
@bittorf yes, i would be okay with that if you can work out the other stuff to make it posix compatible.
@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.
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.
@166MMX commented on GitHub (May 13, 2016):
I have been [playing around](https://travis-ci.org/166MMX/letsencrypt.sh) with Travis CI and [ShellCheck](https://github.com/koalaman/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.
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.
@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.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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.