2020-03-06 11:54:38

This commit is contained in:
monlor
2020-03-06 11:54:39 +08:00
parent 76f69f247e
commit d54c894dc0
4 changed files with 16 additions and 12 deletions

View File

@@ -4,4 +4,4 @@ needver=""
supports="linux_arm,linux_mips,linux_x86_64"
appinfo="一款支持多平台多架构的Shell工具箱"
newinfo="新增base64_encode工具"
version="0.1.9.1"
version="0.1.9.2"

View File

@@ -9,11 +9,11 @@ wgetsh() {
[ ! -d "$wgetfiledir" ] && mkdir -p $wgetfiledir
[ ! -d ${mbtmp} ] && mkdir -p ${mbtmp}
rm -rf ${mbtmp}/${wgetfilename}
if command -v wget-ssl &> /dev/null; then
if command -v curl &> /dev/null; then
result1=$(curl -skL --connect-timeout 10 -m 20 -w %{http_code} -o "${mbtmp}/${wgetfilename}" "$wgeturl")
else
wget-ssl -q --no-check-certificate --tries=1 --timeout=10 -O "${mbtmp}/${wgetfilename}" "$wgeturl"
[ $? -eq 0 ] && result="200"
else
result1=$(curl -skL --connect-timeout 10 -m 20 -w %{http_code} -o "${mbtmp}/${wgetfilename}" "$wgeturl")
fi
[ -f "${mbtmp}/${wgetfilename}" ] && result2=$(du -sh "${mbtmp}/${wgetfilename}" 2> /dev/null | awk '{print$1}')
if [ "$result" = "200" ] && [ "$result2" != '0' ]; then

View File

@@ -47,11 +47,11 @@ fi
logsh "【Tools】" "下载工具箱文件..."
rm -rf ${mbtmp}/mixbox.tar.gz > /dev/null 2>&1
if command -v wget-ssl &> /dev/null; then
if command -v curl &> /dev/null; then
result=$(curl -w %{http_code} -skLo ${mbtmp}/mixbox.tar.gz ${mburl}/appstore/mixbox_${model}.tar.gz)
else
wget-ssl -q --no-check-certificate --tries=1 --timeout=10 -O ${mbtmp}/mixbox.tar.gz ${mburl}/appstore/mixbox_${model}.tar.gz
[ $? -eq 0 ] && result="200"
else
result=$(curl -w %{http_code} -skLo ${mbtmp}/mixbox.tar.gz ${mburl}/appstore/mixbox_${model}.tar.gz)
fi
[ "$result" != "200" ] && logsh "【Tools】" "文件下载失败!" && exit 1
logsh "【Tools】" "解压工具箱文件"

View File

@@ -116,11 +116,15 @@ deploy() {
sed -Ei "s#mbfiles/git/raw/[a-z]+#mbfiles/git/raw/$2#" $1/install.sh
cd $1
if [ ! -d ".git" ]; then
git init
git config --local user.email "monlor@qq.com"
git config --local user.name "monlor"
fi
if git status &> /dev/null; then
git add .
git commit -m "$(TZ='Asia/Shanghai' date "+%Y-%m-%d %H:%M:%S")" -a
fi
git push "$3" master:"$2" -f
}