Closed Wuodan closed 6 years ago
that -z "${blah:-}" scares me, you tested this with and without --headless?
Yes, tested with and without --headless.
That -z "${blah:-}" is a nice way to get empty string only if var is null (unset). Meaning the installer doesn't crash when var is null.
https://www.tldp.org/LDP/abs/html/parameter-substitution.html ${parameter-default} => If parameter not set, use default. also see http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02 for difference between ${parameter:-word} and ${parameter-word}
parameterSet and Not Null | parameterSet But Null | parameterUnset | |
---|---|---|---|
${parameter:-word} | substitute parameter | substitute word | substitute word |
${parameter-word} | substitute parameter | substitute null | substitute word |
Replaced by #45, merged into that PR.
The first 4 commits are already in #40.
Headless mode: I think you will like this. In a VM, simply run:
and enjoy the show! Each menu has a timeout of 3 seconds and the installer steps through to the end!
This enables fully automated testing of the installer, for example with packer/vagrant/vbox, see: https://github.com/wuodan/pentoo-packer where I run 3 installations in parallel (rc7.2, rc7.2 low ram, latest beta). Already found 2 bugs this way :-)
It's not running from a config file yet (#34), but this is a big step towards it.