Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign uprustup-init: remove dependency on `file` command #543
+10
−7
Conversation
This comment has been minimized.
This comment has been minimized.
|
r? @brson Seems like a neat trick to me! |
This comment has been minimized.
This comment has been minimized.
|
@zarvox you ninja! |
brson
closed this
Jun 23, 2016
brson
reopened this
Jun 23, 2016
brson
merged commit ddb0d1b
into
rust-lang:master
Jun 23, 2016
zarvox
deleted the
zarvox:remove-file-dependency
branch
Jun 23, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
zarvox commentedJun 23, 2016
Some distros don't install file(1) by default. For the purposes of userspace
architecture detection, rather than screenscrape file(1), we can check the ELF
header directly with only tools that are included in the default coreutils.
Note that printf is a builtin in some shells (like /bin/dash on Debian), and
may be less featureful than the one from coreutils, but that the syntax here
should work on all such shells.
Tested against bash, dash, and busybox sh.