Skip to content

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

Merged
merged 3 commits into from
Jul 12, 2024

Conversation

petk
Copy link
Member

@petk petk commented Jul 11, 2024

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

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
Copy link
Member

@nielsdos nielsdos left a 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!

@petk
Copy link
Member Author

petk commented Jul 11, 2024

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.
Copy link
Member

@nielsdos nielsdos left a 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.
@petk
Copy link
Member Author

petk commented Jul 11, 2024

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.

Copy link
Member

@nielsdos nielsdos left a 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

@petk petk merged commit 58a3ab9 into php:master Jul 12, 2024
2 checks passed
@petk petk deleted the patch-fix-apache-warning branch July 12, 2024 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants