aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2019-06-22 05:20:36 +0300
committerrinpatch <rinpatch@sdf.org>2019-06-22 05:20:36 +0300
commit1d2332ce79c374f4958b5d554ea96d382e9806fb (patch)
tree50ced1dcabec67141582f0f5b7eea5fc7f1be850
parent38a803a1f86b459d193aa234d00b1af3895edab1 (diff)
downloadpleroma-1d2332ce79c374f4958b5d554ea96d382e9806fb.tar.gz
Use uname -m instead of arch for more portability
-rw-r--r--docs/installation/releases_en.md2
-rwxr-xr-xrel/files/bin/pleroma_ctl2
2 files changed, 2 insertions, 2 deletions
diff --git a/docs/installation/releases_en.md b/docs/installation/releases_en.md
index 5ccd50c47..7dde26771 100644
--- a/docs/installation/releases_en.md
+++ b/docs/installation/releases_en.md
@@ -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.
diff --git a/rel/files/bin/pleroma_ctl b/rel/files/bin/pleroma_ctl
index b0e1874a9..9c67b209b 100755
--- a/rel/files/bin/pleroma_ctl
+++ b/rel/files/bin/pleroma_ctl
@@ -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