Don't use arch in shell scripts

Signed-off-by: Morgan Tocker <tocker@gmail.com>
This commit is contained in:
Morgan Tocker 2019-11-27 09:16:13 -07:00
Родитель 0e90bab5d0
Коммит 51e75357fb
2 изменённых файлов: 5 добавлений и 6 удалений

Просмотреть файл

@ -127,12 +127,11 @@ function install_dep() {
# 1. Installation of dependencies.
#
# Wrapper around the `arch` command which plays nice with OS X
# We should not use the arch command, since it is not reliably
# available on macOS or some linuxes:
# https://www.gnu.org/software/coreutils/manual/html_node/arch-invocation.html
function get_arch() {
case $(uname) in
Linux) arch;;
Darwin) uname -m;;
esac
uname -m
}

Просмотреть файл

@ -79,7 +79,7 @@ export PKG_CONFIG_PATH
# According to https://github.com/etcd-io/etcd/blob/a621d807f061e1dd635033a8d6bc261461429e27/Documentation/op-guide/supported-platform.md,
# currently, etcd is unstable on arm64, so ETCD_UNSUPPORTED_ARCH should be set.
if [ "$(arch)" == aarch64 ]; then
if [ "$(uname -m)" == aarch64 ]; then
export ETCD_UNSUPPORTED_ARCH=arm64
fi