From dc21125153ddbf8c823d1c7509fa68ca1765385d Mon Sep 17 00:00:00 2001 From: 233boy <31657650+233boy@users.noreply.github.com> Date: Thu, 20 Jun 2019 14:41:54 +0800 Subject: [PATCH] close #248 --- v2ray.sh | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/v2ray.sh b/v2ray.sh index 4b18a1a..ba91a3a 100644 --- a/v2ray.sh +++ b/v2ray.sh @@ -16,15 +16,37 @@ cmd="apt-get" sys_bit=$(uname -m) -if [[ $sys_bit == "i386" || $sys_bit == "i686" ]]; then +case $sys_bit in +i[36]86) v2ray_bit="32" -elif [[ $sys_bit == "x86_64" ]]; then + caddy_arch="386" + ;; +x86_64) v2ray_bit="64" -else - echo -e " 哈哈……这个 ${red}辣鸡脚本${none} 不支持你的系统。 ${yellow}(-_-) ${none}" && exit 1 -fi + caddy_arch="amd64" + ;; +*armv6*) + v2ray_bit="arm" + caddy_arch="arm6" + ;; +*armv7*) + v2ray_bit="arm" + caddy_arch="arm7" + ;; +*aarch64* | *armv8*) + v2ray_bit="arm64" + caddy_arch="arm64" + ;; +*) + echo -e " + 哈哈……这个 ${red}辣鸡脚本${none} 不支持你的系统。 ${yellow}(-_-) ${none} + + 备注: 仅支持 Ubuntu 16+ / Debian 8+ / CentOS 7+ 系统 + " && exit 1 + ;; +esac -if [[ -f /usr/bin/yum ]]; then +if [[ $(command -v yum) ]]; then cmd="yum"