增加prepare.sh

如果要运行更多函数 建议先执行它
This commit is contained in:
悟空的日常镜像仓库 2023-09-22 22:59:35 +08:00
parent ba3437022f
commit c0445fec0d
2 changed files with 21 additions and 2 deletions

View File

@ -1,4 +1,11 @@
#!/bin/sh #!/bin/sh
opkg update check_bash_installed() {
opkg install bash if [ -x "/bin/bash" ]; then
echo "downloading gl-inet.sh ......"
else
opkg update
opkg install bash
fi
}
check_bash_installed
wget -O /tmp/gl-inet.sh https://ghproxy.com/https://raw.githubusercontent.com/wukongdaily/gl-inet-onescript/master/gl-inet.sh && chmod +x /tmp/gl-inet.sh && /tmp/gl-inet.sh wget -O /tmp/gl-inet.sh https://ghproxy.com/https://raw.githubusercontent.com/wukongdaily/gl-inet-onescript/master/gl-inet.sh && chmod +x /tmp/gl-inet.sh && /tmp/gl-inet.sh

12
prepare.sh Normal file
View File

@ -0,0 +1,12 @@
#!/bin/bash
# 默认情况下MT3000和MT2500A的环境是ash
# 建议安装bash 满足更多的函数调用
check_bash_installed() {
if [ -x "/bin/bash" ]; then
echo "downloading gl-inet.sh ......"
else
opkg update
opkg install bash
fi
}
check_bash_installed