mirror of
https://github.com/monlor/MIXBOX-ARCHIVE.git
synced 2026-03-10 23:41:27 +00:00
2020-04-26 09:44:29
This commit is contained in:
3
.github/workflows/main.yml
vendored
3
.github/workflows/main.yml
vendored
@@ -31,4 +31,5 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
git clone -b `basename ${BRANCH_NAME}` ${CO_REF}
|
git clone -b `basename ${BRANCH_NAME}` ${CO_REF}
|
||||||
bash ./tools/gitsync.sh pack
|
bash ./tools/gitsync.sh pack
|
||||||
bash ./tools/gitsync.sh deploy mbfiles `basename ${BRANCH_NAME}` ${CO_REF}
|
bash ./tools/gitsync.sh deploy_lfs mbfiles `basename ${BRANCH_NAME}` ${CO_REF}
|
||||||
|
bash ./tools/gitsync.sh deploy mbfiles `basename ${BRANCH_NAME}` ${GH_REF}
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
service="Aria2"
|
service="Aria2"
|
||||||
appname="aria2"
|
appname="aria2"
|
||||||
needver="0.1.7"
|
needver="0.1.7"
|
||||||
|
backupfiles="config/aria2.conf"
|
||||||
supports="linux_arm,linux_mips,linux_x86_64"
|
supports="linux_arm,linux_mips,linux_x86_64"
|
||||||
appinfo="Linux下一款高效的下载工具"
|
appinfo="Linux下一款高效的下载工具"
|
||||||
newinfo="支持x86_64设备"
|
newinfo="支持x86_64设备"
|
||||||
version="0.0.6"
|
version="0.0.7"
|
||||||
|
|||||||
@@ -69,7 +69,8 @@ get_applist() {
|
|||||||
update_applist() {
|
update_applist() {
|
||||||
|
|
||||||
wgetsh ${mbtmp}/applist_tmp.txt $mburl/applist.txt
|
wgetsh ${mbtmp}/applist_tmp.txt $mburl/applist.txt
|
||||||
if [ $? -eq 0 ]; then
|
# 判断applist的内容,防止软件源异常
|
||||||
|
if [ $? -eq 0 ] && [ -n `cat ${mbtmp}/applist_tmp.txt | grep -E "^mixbox"` ]; then
|
||||||
rm -rf ${mbtmp}/applist.txt
|
rm -rf ${mbtmp}/applist.txt
|
||||||
cat ${mbtmp}/applist_tmp.txt | grep "${model}" | sort -u | while read line; do
|
cat ${mbtmp}/applist_tmp.txt | grep "${model}" | sort -u | while read line; do
|
||||||
local install_text=""
|
local install_text=""
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
export PATH=$PATH:/etc/mixbox/bin
|
export PATH=$PATH:/etc/mixbox/bin
|
||||||
|
|
||||||
mburl_coding="https://monlor.coding.net/p/mbfiles/d/mbfiles/git/raw/master"
|
mburl_coding="https://monlor.coding.net/p/mbfiles/d/mbfiles/git/raw/master"
|
||||||
mburl_github="https://raw.githubusercontent.com/monlor/MIXBOX/master"
|
mburl_github="https://raw.githubusercontent.com/monlor/mbfiles/master"
|
||||||
# mburl_test="https://monlor.coding.net/p/mbfiles/d/mbfiles/git/raw/test"
|
# mburl_test="https://monlor.coding.net/p/mbfiles/d/mbfiles/git/raw/test"
|
||||||
mburl=$(mbdb get mixbox.main.url) || mburl="$mburl_coding"
|
mburl=$(mbdb get mixbox.main.url) || mburl="$mburl_coding"
|
||||||
mbroot=$(mbdb get mixbox.main.path)
|
mbroot=$(mbdb get mixbox.main.path)
|
||||||
|
|||||||
@@ -3,5 +3,5 @@ appname="mixbox"
|
|||||||
needver=""
|
needver=""
|
||||||
supports="linux_arm,linux_mips,linux_x86_64"
|
supports="linux_arm,linux_mips,linux_x86_64"
|
||||||
appinfo="一款支持多平台,多架构的Shell工具箱"
|
appinfo="一款支持多平台,多架构的Shell工具箱"
|
||||||
newinfo="修复base64命令段错误,升级后需要手工删除/etc/mixbox/bin/base64*"
|
newinfo="修复插件列表为空的bug"
|
||||||
version="0.1.9.7"
|
version="0.1.9.8"
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#copyright by monlor
|
#copyright by monlor
|
||||||
[ -n "$(uci -q get monlor.tools 2> /dev/null)" ] && echo "工具箱版本过低,此更新程序已不再支持,请执行[$(uci -q get monlor.tools.path)/scripts/uninstall.sh]卸载工具箱后重新安装新的版本!" && exit 1
|
|
||||||
source /etc/mixbox/bin/base
|
source /etc/mixbox/bin/base
|
||||||
|
|
||||||
logsh "【Tools】" "正在更新工具箱程序... "
|
logsh "【Tools】" "正在更新工具箱程序... "
|
||||||
@@ -33,9 +32,9 @@ logsh "【Tools】" "赋予可执行权限"
|
|||||||
chmod -R +x ${mbroot}/bin
|
chmod -R +x ${mbroot}/bin
|
||||||
chmod -R +x ${mbroot}/scripts
|
chmod -R +x ${mbroot}/scripts
|
||||||
|
|
||||||
# 执行初始化脚本
|
# 清理工作
|
||||||
|
logsh "【Tools】" "一点点清理工作..."
|
||||||
# ${mbroot}/scripts/init.sh
|
rm -rf ${mbroot}/bin/base64*
|
||||||
|
|
||||||
if [ -z "$(mbdb get mixbox.main.model)" ]; then
|
if [ -z "$(mbdb get mixbox.main.model)" ]; then
|
||||||
model=$(uname -ms | tr ' ' '_' | tr '[A-Z]' '[a-z]')
|
model=$(uname -ms | tr ' ' '_' | tr '[A-Z]' '[a-z]')
|
||||||
|
|||||||
@@ -5,5 +5,5 @@ supports="linux_arm,linux_mips,linux_x86_64"
|
|||||||
openport="1"
|
openport="1"
|
||||||
backupfiles="config/ssserver.conf,config/sscontrol.conf,config/customize_black.conf,config/customize_white.conf"
|
backupfiles="config/ssserver.conf,config/sscontrol.conf,config/customize_black.conf,config/customize_white.conf"
|
||||||
appinfo="最好的翻墙工具,没有之一,还可以加速国内外游戏"
|
appinfo="最好的翻墙工具,没有之一,还可以加速国内外游戏"
|
||||||
newinfo="修改obfs-local问题"
|
newinfo="v2ray软件源失效可用"
|
||||||
version="0.1.5"
|
version="0.1.6"
|
||||||
|
|||||||
@@ -13,7 +13,9 @@ eval `mbdb export shadowsocks`
|
|||||||
get_v2ray_bin() {
|
get_v2ray_bin() {
|
||||||
result1=$(curl -skL $mburl/appsbin/v2ray-bin/$model/lastest.txt) &> /dev/null
|
result1=$(curl -skL $mburl/appsbin/v2ray-bin/$model/lastest.txt) &> /dev/null
|
||||||
result2=$(${mbroot}/apps/${appname}/bin/v2ray -version | head -1 | cut -d' ' -f2) &> /dev/null
|
result2=$(${mbroot}/apps/${appname}/bin/v2ray -version | head -1 | cut -d' ' -f2) &> /dev/null
|
||||||
[ -z "$result1" ] && logsh "【$service】" "获取v2ray在线版本失败,请检查网络!" && exit 1
|
if [ -z "$result1" ]; then
|
||||||
|
logsh "【$service】" "获取v2ray在线版本失败,请检查网络!"
|
||||||
|
else
|
||||||
logsh "【$service】" "检测v2ray版本,本地版本:$result2,在线版本:$result1"
|
logsh "【$service】" "检测v2ray版本,本地版本:$result2,在线版本:$result1"
|
||||||
if [ "$result1" != "$result2" ]; then
|
if [ "$result1" != "$result2" ]; then
|
||||||
logsh "【$service】" "版本不一致,正在更新..."
|
logsh "【$service】" "版本不一致,正在更新..."
|
||||||
@@ -22,6 +24,7 @@ get_v2ray_bin() {
|
|||||||
chmod +x ${mbroot}/apps/${appname}/bin/v2ray
|
chmod +x ${mbroot}/apps/${appname}/bin/v2ray
|
||||||
chmod +x ${mbroot}/apps/${appname}/bin/v2ctl
|
chmod +x ${mbroot}/apps/${appname}/bin/v2ctl
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
get_config() {
|
get_config() {
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ pack() {
|
|||||||
if [ -f ${pack_dir}/applist.txt ]; then
|
if [ -f ${pack_dir}/applist.txt ]; then
|
||||||
version_old=`cat ${pack_dir}/applist.txt | grep "$line|" | cut -d'|' -f4`
|
version_old=`cat ${pack_dir}/applist.txt | grep "$line|" | cut -d'|' -f4`
|
||||||
version_new=`cat apps/$line/config/$line.uci | grep "version=" | cut -d'=' -f2 | sed -e 's/"//g'`
|
version_new=`cat apps/$line/config/$line.uci | grep "version=" | cut -d'=' -f2 | sed -e 's/"//g'`
|
||||||
[ "$version_new" = "$version_old" ] && echo "$line未更新,跳过打包..." && continue
|
[ "$version_new" != "$version_old" ] && echo "打包$line..." || continue
|
||||||
fi
|
fi
|
||||||
pack_app $line
|
pack_app $line
|
||||||
done
|
done
|
||||||
@@ -114,7 +114,7 @@ reset() {
|
|||||||
# $1: path to push
|
# $1: path to push
|
||||||
# $2: remote branch name
|
# $2: remote branch name
|
||||||
# $3: remote url with token
|
# $3: remote url with token
|
||||||
deploy() {
|
deploy_lfs() {
|
||||||
|
|
||||||
sed -Ei "s#mbfiles/git/raw/[a-z]+#mbfiles/git/raw/$2#" $1/install.sh
|
sed -Ei "s#mbfiles/git/raw/[a-z]+#mbfiles/git/raw/$2#" $1/install.sh
|
||||||
|
|
||||||
@@ -138,6 +138,24 @@ deploy() {
|
|||||||
git push "$3"
|
git push "$3"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
deploy() {
|
||||||
|
|
||||||
|
sed -Ei "s#mbfiles/git/raw/[a-z]+#mbfiles/git/raw/$2#" $1/install.sh
|
||||||
|
|
||||||
|
cd $1
|
||||||
|
if [ ! -d ".git" ]; then
|
||||||
|
git init
|
||||||
|
fi
|
||||||
|
git config --local user.email "monlor@qq.com"
|
||||||
|
git config --local user.name "monlor"
|
||||||
|
|
||||||
|
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"
|
||||||
|
}
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
github)
|
github)
|
||||||
github master
|
github master
|
||||||
@@ -156,7 +174,12 @@ case $1 in
|
|||||||
reset)
|
reset)
|
||||||
reset master
|
reset master
|
||||||
;;
|
;;
|
||||||
|
deploy_lfs)
|
||||||
|
shift 1
|
||||||
|
deploy_lfs $@
|
||||||
|
;;
|
||||||
deploy)
|
deploy)
|
||||||
shift 1
|
shift 1
|
||||||
deploy $@
|
deploy $@
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
Reference in New Issue
Block a user