diff --git a/drive-gl-inet.sh b/drive-gl-inet.sh index a89f55c..b7b5845 100644 --- a/drive-gl-inet.sh +++ b/drive-gl-inet.sh @@ -1,4 +1,11 @@ #!/bin/sh -opkg update -opkg install bash +check_bash_installed() { + 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 diff --git a/prepare.sh b/prepare.sh new file mode 100644 index 0000000..201633b --- /dev/null +++ b/prepare.sh @@ -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 \ No newline at end of file