github.com/sagernet/sing-box@v1.9.0-rc.20/docs/installation/tools/arch-install.sh (about) 1 #!/bin/bash 2 3 set -e -o pipefail 4 5 ARCH_RAW=$(uname -m) 6 case "${ARCH_RAW}" in 7 'x86_64') ARCH='amd64';; 8 'x86' | 'i686' | 'i386') ARCH='386';; 9 'aarch64' | 'arm64') ARCH='arm64';; 10 'armv7l') ARCH='armv7';; 11 's390x') ARCH='s390x';; 12 *) echo "Unsupported architecture: ${ARCH_RAW}"; exit 1;; 13 esac 14 15 VERSION=$(curl -s https://api.github.com/repos/SagerNet/sing-box/releases/latest \ 16 | grep tag_name \ 17 | cut -d ":" -f2 \ 18 | sed 's/\"//g;s/\,//g;s/\ //g;s/v//') 19 20 curl -Lo sing-box.pkg.tar.zst "https://github.com/SagerNet/sing-box/releases/download/v${VERSION}/sing-box_${VERSION}_linux_${ARCH}.pkg.tar.zst" 21 sudo pacman -U sing-box.pkg.tar.zst 22 rm sing-box.pkg.tar.zst