-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Autotools: Fix config.status script syntax #14929
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
Conversation
The init-cmds argument is appended to the config.status script with cat command and variables $var are replaced during the cat step to their values, so quoting these values fixes the syntax errors. Fixes report in phpGH-14872
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this works indeed!
I'll append something else here so that this entire grepped string gets a bit simpler.
Instead of checking for entire "grepped" string, this only checks for yes|no values instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still fine
The "grep -q" is not portable according to docs so this redirects the output and checks the exit status.
Ok, this should now do it. The 2nd commit uses grep -q but the 3rd commit now makes this invocation portable across some possible exotic shells also just in case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't know -q
wasn't standard, anyway this is still fine :p
The init-cmds argument is appended to the config.status script with cat command and variables $var are replaced during the cat step to their values, so quoting these values fixes the syntax errors.
Fixes report in GH-14872