Skip to content

Conversation

@wking
Copy link
Contributor

@wking wking commented Mar 15, 2018

The previous

$(< rootfs-files)

is a Bashism that's not part of POSIX command substitution. For Bash, the $(< …) form is slightly faster (no need to exec cat), but not everyone uses Bash.

@liangchenye, I bet this is what was happening to you.

The previous

  $(< rootfs-files)

is a Bashism that's not part of POSIX command substitution [1].  For
Bash, the $(< ...) form is slightly faster (no need to exec cat), but
not everyone uses Bash.

[1]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_03

Signed-off-by: W. Trevor King <wking@tremily.us>
@liangchenye
Copy link
Member

It solves the problem.

But I'm still not sure why the original script failed.
If I run 'tar .... $(< rootfs-files)' manually in my terminal, it works.
But if I run 'make ...', it fails.

@liangchenye
Copy link
Member

liangchenye commented Mar 15, 2018

LGTM

Approved with PullApprove

@liangchenye liangchenye merged commit 3686e87 into opencontainers:master Mar 15, 2018
@wking wking deleted the command-substitution-bashism branch April 6, 2018 16:08
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