Skip to content

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 <[email protected]>
Signed-off-by: W. Trevor King <[email protected]>
@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