Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
update.sh 1.15 KB
Copy Edit Raw Blame History
cv-robot authored 2023-11-03 21:21 . first commit
#!/bin/bash
# ensure all required packages are installed
if [[ -f /usr/bin/apt ]]; then
TARGET="debian"
echo "Debian-based Linux confirmed."
elif [[ -f /usr/bin/pacman ]]; then
TARGET="arch"
echo "Arch Linux confirmed."
elif [[ -f /usr/bin/dnf ]]; then
TARGET="fedora"
echo "Fedora/openSUSE detected."
fi
if [[ ${TARGET} == "debian" ]]; then
sudo apt update -y
sudo apt install -y wget openssl net-tools libsox-dev libopus-dev make iproute2 xz-utils libopusfile-dev pkg-config gcc curl g++ unzip avahi-daemon git libasound2-dev libsodium-dev
elif [[ ${TARGET} == "arch" ]]; then
sudo pacman -Sy --noconfirm
sudo pacman -S --noconfirm wget openssl net-tools sox opus make iproute2 opusfile curl unzip avahi git libsodium
elif [[ ${TARGET} == "fedora" ]]; then
sudo dnf update
sudo dnf install -y wget openssl net-tools sox opus make opusfile curl unzip avahi git libsodium-devel
fi
if [[ ! -d ./chipper ]]; then
echo "This must be run in the wire-pod/ directory."
exit 1
fi
if [[ $EUID != "0" ]]; then
echo "This must be run as root."
exit 1
fi
git fetch --all
git reset --hard origin/main
echo
echo "Updated!"
echo
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化