Update cattools.sh
This commit is contained in:
12
cattools.sh
12
cattools.sh
@@ -14,22 +14,20 @@ MT798X_REPO="https://fastly.jsdelivr.net/gh/miaoermua/cattools@main/repo/mt798x/
|
|||||||
AMD64_EFI_SYSUP="https://github.com/miaoermua/CatWrt/releases/download/v23.8/CatWrt.v23.8.x86_64-squashfs-combined-efi.img.gz"
|
AMD64_EFI_SYSUP="https://github.com/miaoermua/CatWrt/releases/download/v23.8/CatWrt.v23.8.x86_64-squashfs-combined-efi.img.gz"
|
||||||
AMD64_BIOS_SYSUP="https://github.com/miaoermua/CatWrt/releases/download/v23.8/CatWrt.v23.8.x86_64-squashfs-combined.img.gz"
|
AMD64_BIOS_SYSUP="https://github.com/miaoermua/CatWrt/releases/download/v23.8/CatWrt.v23.8.x86_64-squashfs-combined.img.gz"
|
||||||
|
|
||||||
# Check OpenWrt
|
# Check ROOT & OpenWrt
|
||||||
|
|
||||||
if [ $(id -u) != "0" ]; then
|
if [ $(id -u) != "0" ]; then
|
||||||
echo "Error: You must be root to run this script, please use root user"
|
echo "Error: You must be root to run this script, please use root user"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
release=$(cat /etc/openwrt_release)
|
openwrt_release=$(cat /etc/openwrt_release)
|
||||||
|
if ! grep -q "OpenWrt" <<< "$openwrt_release"; then
|
||||||
if [[ $release =~ "OpenWrt" ]]
|
echo "Your system is not supported!"
|
||||||
else
|
|
||||||
echo "Abnormal system environment..."
|
|
||||||
echo " "
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
update(){
|
update(){
|
||||||
if ! curl -fsSLo /root/cattools https://service.miaoer.xyz/cattools/cattools.sh; then
|
if ! curl -fsSLo /root/cattools https://service.miaoer.xyz/cattools/cattools.sh; then
|
||||||
echo "[main site]Unable to connect to update site! 无法连接更新站点!"
|
echo "[main site]Unable to connect to update site! 无法连接更新站点!"
|
||||||
|
|||||||
Reference in New Issue
Block a user