mirror of
https://github.com/SagerNet/sing-box.git
synced 2026-04-13 20:28:32 +10:00
Add repo release
This commit is contained in:
22
docs/installation/tools/arch-install.sh
Normal file
22
docs/installation/tools/arch-install.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e -o pipefail
|
||||
|
||||
ARCH_RAW=$(uname -m)
|
||||
case "${ARCH_RAW}" in
|
||||
'x86_64') ARCH='amd64';;
|
||||
'x86' | 'i686' | 'i386') ARCH='386';;
|
||||
'aarch64' | 'arm64') ARCH='arm64';;
|
||||
'armv7l') ARCH='armv7';;
|
||||
's390x') ARCH='s390x';;
|
||||
*) echo "Unsupported architecture: ${ARCH_RAW}"; exit 1;;
|
||||
esac
|
||||
|
||||
VERSION=$(curl -s https://api.github.com/repos/SagerNet/sing-box/releases/latest \
|
||||
| grep tag_name \
|
||||
| cut -d ":" -f2 \
|
||||
| sed 's/\"//g;s/\,//g;s/\ //g;s/v//')
|
||||
|
||||
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"
|
||||
sudo pacman -U sing-box.pkg.tar.zst
|
||||
rm sing-box.pkg.tar.zst
|
||||
23
docs/installation/tools/deb-install.sh
Normal file
23
docs/installation/tools/deb-install.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e -o pipefail
|
||||
|
||||
ARCH_RAW=$(uname -m)
|
||||
case "${ARCH_RAW}" in
|
||||
'x86_64') ARCH='amd64';;
|
||||
'x86' | 'i686' | 'i386') ARCH='386';;
|
||||
'aarch64' | 'arm64') ARCH='arm64';;
|
||||
'armv7l') ARCH='armv7';;
|
||||
's390x') ARCH='s390x';;
|
||||
*) echo "Unsupported architecture: ${ARCH_RAW}"; exit 1;;
|
||||
esac
|
||||
|
||||
VERSION=$(curl -s https://api.github.com/repos/SagerNet/sing-box/releases/latest \
|
||||
| grep tag_name \
|
||||
| cut -d ":" -f2 \
|
||||
| sed 's/\"//g;s/\,//g;s/\ //g;s/v//')
|
||||
|
||||
curl -Lo sing-box.deb "https://github.com/SagerNet/sing-box/releases/download/v${VERSION}/sing-box_${VERSION}_linux_${ARCH}.deb"
|
||||
sudo dpkg -i sing-box.deb
|
||||
rm sing-box.deb
|
||||
|
||||
22
docs/installation/tools/rpm-install.sh
Normal file
22
docs/installation/tools/rpm-install.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e -o pipefail
|
||||
|
||||
ARCH_RAW=$(uname -m)
|
||||
case "${ARCH_RAW}" in
|
||||
'x86_64') ARCH='amd64';;
|
||||
'x86' | 'i686' | 'i386') ARCH='386';;
|
||||
'aarch64' | 'arm64') ARCH='arm64';;
|
||||
'armv7l') ARCH='armv7';;
|
||||
's390x') ARCH='s390x';;
|
||||
*) echo "Unsupported architecture: ${ARCH_RAW}"; exit 1;;
|
||||
esac
|
||||
|
||||
VERSION=$(curl -s https://api.github.com/repos/SagerNet/sing-box/releases/latest \
|
||||
| grep tag_name \
|
||||
| cut -d ":" -f2 \
|
||||
| sed 's/\"//g;s/\,//g;s/\ //g;s/v//')
|
||||
|
||||
curl -Lo sing-box.rpm "https://github.com/SagerNet/sing-box/releases/download/v${VERSION}/sing-box_${VERSION}_linux_${ARCH}.rpm"
|
||||
sudo rpm -i sing-box.rpm
|
||||
rm sing-box.rpm
|
||||
6
docs/installation/tools/rpm.repo
Normal file
6
docs/installation/tools/rpm.repo
Normal file
@@ -0,0 +1,6 @@
|
||||
[sing-box]
|
||||
name=sing-box
|
||||
baseurl=https://rpm.sagernet.org/
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=https://deb.sagernet.org/gpg.key
|
||||
Reference in New Issue
Block a user