-
-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DO NOT MERGE: Shellcheck script files in initrd #872
Conversation
@Thrilleratplay what is your preferate approach between #862 and here? Seems lik here wins to me. |
@tlaurion I would probably vote for this version, fake BASH. It will likely be easier to verify the changes and run spellcheck against. Again, this could only be a temporary solution with an long term goal of rewriting everything in POSIX. |
cbbf253
to
6357d41
Compare
@Thrilleratplay : can you make circleCi follow your github so that automatic builds are made at each commit? This PR seems mature enough to test builds for regressions |
@tlaurion I will try. Currently I am still testing and running into issues. |
…ictyly excluding rules in make command
This is not going to work. #862 approach is preferred. |
This is an alternative approach to #862.
Instead of rewriting all BASH syntax to be POSIX, add busybox config to set
CONFIG_BASH_IS_ASH=y
which I believe statically links/bin/ash
to/bin/bash
. This combined with the existingCONFIG_ASH_BASH_COMPAT
setting should allow shellcheck to the check the scripts under/initrd
as closer to how they already exists and with few large changes.While labeling these scripts as
#!/bin/bash
may be misleading, all scripts are read-only within the ROM and will still need to be tested before being committed in the official repo. The only problem I can foresee would be if users who try to execute BASH scripts from external media that may execute bash scripts with incompatible syntax, although, I think this is currently a possibility.Exceptions added for:
.shellcheckrc
initrd/init.sh
initrd/sbin/config-dhcp.sh
@osresearch @tlaurion @MrChromebox One of three possible paths: