You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by sp...@apache.org on 2022/03/14 03:14:04 UTC
[apisix] branch master updated: feat: support to install dependencies under arm64 (#6590)
This is an automated email from the ASF dual-hosted git repository.
spacewander pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push:
new ddb884c feat: support to install dependencies under arm64 (#6590)
ddb884c is described below
commit ddb884ca30258b3f68ca65cb05ca0357dbdfd806
Author: soulbird <zh...@outlook.com>
AuthorDate: Mon Mar 14 11:13:59 2022 +0800
feat: support to install dependencies under arm64 (#6590)
Co-authored-by: soulbird <zh...@gmail.com>
---
utils/install-dependencies.sh | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/utils/install-dependencies.sh b/utils/install-dependencies.sh
index c66a0a8..f121c2c 100755
--- a/utils/install-dependencies.sh
+++ b/utils/install-dependencies.sh
@@ -71,10 +71,15 @@ function install_dependencies_with_apt() {
sudo apt-get update
sudo apt-get -y install software-properties-common wget lsb-release
wget -qO - https://openresty.org/package/pubkey.gpg | sudo apt-key add -
+ arch=$(uname -m | tr '[:upper:]' '[:lower:]')
+ arch_path=""
+ if [[ $arch == "arm64" ]] || [[ $arch == "aarch64" ]]; then
+ arch_path="arm64/"
+ fi
if [[ "${1}" == "ubuntu" ]]; then
- sudo add-apt-repository -y "deb http://openresty.org/package/ubuntu $(lsb_release -sc) main"
+ sudo add-apt-repository -y "deb http://openresty.org/package/${arch_path}ubuntu $(lsb_release -sc) main"
elif [[ "${1}" == "debian" ]]; then
- sudo add-apt-repository -y "deb http://openresty.org/package/debian $(lsb_release -sc) openresty"
+ sudo add-apt-repository -y "deb http://openresty.org/package/${arch_path}debian $(lsb_release -sc) openresty"
fi
sudo apt-get update