Use uname -m instead of arch for more portability
This commit is contained in:
parent
38a803a1f8
commit
1d2332ce79
2 changed files with 2 additions and 2 deletions
|
@ -12,7 +12,7 @@ While in theory OTP releases are possbile to install on any compatible machine,
|
||||||
|
|
||||||
Paste the following into the shell:
|
Paste the following into the shell:
|
||||||
```sh
|
```sh
|
||||||
arch="$(arch)";if [ "$arch" = "x86_64" ];then arch="amd64";elif [ "$arch" = "armv7l" ];then arch="arm";elif [ "$arch" = "aarch64" ];then arch="arm64";else echo "Unsupported arch: $arch">&2;exit 1;fi;if getconf GNU_LIBC_VERSION>/dev/null;then libc_postfix="";elif [ "$(ldd 2>&1|head -c 9)" = "musl libc" ];then libc_postfix="-musl";elif [ "$(find /lib/libc.musl*|wc -l)" ];then libc_postfix="-musl";else echo "Unsupported libc">&2;exit 1;fi;echo "$arch$libc_postfix"
|
arch="$(uname -m)";if [ "$arch" = "x86_64" ];then arch="amd64";elif [ "$arch" = "armv7l" ];then arch="arm";elif [ "$arch" = "aarch64" ];then arch="arm64";else echo "Unsupported arch: $arch">&2;exit 1;fi;if getconf GNU_LIBC_VERSION>/dev/null;then libc_postfix="";elif [ "$(ldd 2>&1|head -c 9)" = "musl libc" ];then libc_postfix="-musl";elif [ "$(find /lib/libc.musl*|wc -l)" ];then libc_postfix="-musl";else echo "Unsupported libc">&2;exit 1;fi;echo "$arch$libc_postfix"
|
||||||
```
|
```
|
||||||
|
|
||||||
If your platform is supported the output will contain the flavour string, you will need it later. If not, this just means that we don't build releases for your platform, you can still try installing from source.
|
If your platform is supported the output will contain the flavour string, you will need it later. If not, this just means that we don't build releases for your platform, you can still try installing from source.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# XXX: This should be removed when elixir's releases get custom command support
|
# XXX: This should be removed when elixir's releases get custom command support
|
||||||
|
|
||||||
detect_flavour() {
|
detect_flavour() {
|
||||||
arch="$(arch)"
|
arch="$(uname -m)"
|
||||||
if [ "$arch" = "x86_64" ]; then
|
if [ "$arch" = "x86_64" ]; then
|
||||||
arch="amd64"
|
arch="amd64"
|
||||||
elif [ "$arch" = "armv7l" ]; then
|
elif [ "$arch" = "armv7l" ]; then
|
||||||
|
|
Loading…
Reference in a new issue