Use uname -m instead of arch for more portability
authorrinpatch <rinpatch@sdf.org>
Sat, 22 Jun 2019 02:20:36 +0000 (05:20 +0300)
committerrinpatch <rinpatch@sdf.org>
Sat, 22 Jun 2019 02:20:36 +0000 (05:20 +0300)
docs/installation/releases_en.md
rel/files/bin/pleroma_ctl

index 5ccd50c47055af94408fe6ebb2069d115ef2b6b3..7dde26771c94bdc1e48b4bb6c9d4c53d851ebc24 100644 (file)
@@ -12,7 +12,7 @@ While in theory OTP releases are possbile to install on any compatible machine,
 
 Paste the following into the shell:
 ```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.
index b0e1874a98c53752c5e5bdb6f6f47f8babd1f8b2..9c67b209b95ccff744455e92055e7a7974735304 100755 (executable)
@@ -2,7 +2,7 @@
 # XXX: This should be removed when elixir's releases get custom command support
 
 detect_flavour() {
-       arch="$(arch)"
+       arch="$(uname -m)"
        if [ "$arch" = "x86_64" ]; then
                arch="amd64"
        elif [ "$arch" = "armv7l" ]; then