Skip to content
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

get-stage3.sh: Replace non-POSIX ${FILE/${DATE}/current} with sed #8

Merged
merged 1 commit into from
Jan 21, 2016

Conversation

wking
Copy link
Contributor

@wking wking commented Jan 21, 2016

${parameter/pattern/string} isn't in POSIX 2013, which leads to:

43: ./get-stage3.sh: Bad substitution

when folks run a strictly-POSIX shell. Replace it with command
substitution
invoking echo and sed.

An alternative to #5.

${parameter/pattern/string} isn't in POSIX 2013 [1], which leads to:

  43: ./get-stage3.sh: Bad substitution

when folks run a strictly-POSIX shell.  Replace it with command
substitution [2] invoking echo [3] and sed [4].

[1]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02
[2]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_03
[3]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/echo.html
[4]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html
Reported-by: Qiang Huang <h.huangqiang@huawei.com>
Signed-off-by: W. Trevor King <wking@tremily.us>
@mrunalp
Copy link
Contributor

mrunalp commented Jan 21, 2016

Thanks! LGTM.

mrunalp pushed a commit that referenced this pull request Jan 21, 2016
get-stage3.sh: Replace non-POSIX `${FILE/${DATE}/current}` with sed
@mrunalp mrunalp merged commit 51bcff1 into opencontainers:master Jan 21, 2016
@mrunalp mrunalp mentioned this pull request Jan 21, 2016
@wking wking deleted the get-stage3-sed-substitution branch March 8, 2016 04:25
wking pushed a commit to wking/ocitools-v2 that referenced this pull request Nov 17, 2016
CONTRIBUTING: Allow collaborative pull requests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants