forked from pantsbuild/pants
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
download_binary.sh takes hostname as a parameter (pantsbuild#5234)
This allows it to be re-used in contexts where an alternative binary host is used.
- Loading branch information
1 parent
6052b2a
commit aabddf0
Showing
6 changed files
with
38 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash -eu | ||
|
||
# Outputs the current operating system and variant, as used by BinaryUtils. | ||
# Example output: mac/10.13 | ||
# Example output: linux/x86_64 | ||
|
||
case "$(uname)" in | ||
"Darwin") | ||
os="mac" | ||
base="$(uname -r)" | ||
os_version="10.$(( ${base%%.*} - 4))" | ||
;; | ||
"Linux") | ||
os="linux" | ||
os_version="$(uname -m)" | ||
;; | ||
*) | ||
echo >&2 "Unknown platform" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
echo "${os}/${os_version}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters