Skip to content

Commit 28ba138

Browse files
committed
scripts
1 parent 6e74e12 commit 28ba138

File tree

4 files changed

+54
-0
lines changed

4 files changed

+54
-0
lines changed

build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ done
4646

4747
#cp application.yml "${OUTPUT_DIR}/application.yml"
4848
cp -r static "${OUTPUT_DIR}/static" # https://github.com/ProtobufBot/Client-UI 前端编译产物dist
49+
cp ./scripts/* "${OUTPUT_DIR}/" # 复制运行脚本
4950

5051
echo "可以把不要的系统删掉">"${OUTPUT_DIR}/可以把不要的系统删掉"
5152

scripts/env_run.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
3+
cmd="gmc "
4+
5+
if [ $UIN ];then
6+
cmd+="-uin $UIN "
7+
fi
8+
9+
if [ $PASS ];then
10+
cmd+="-pass $PASS "
11+
fi
12+
13+
if [ $PORT ];then
14+
cmd+="-port $PORT "
15+
fi
16+
17+
if [ $WS_URL ];then
18+
cmd+="-ws_url $WS_URL "
19+
fi
20+
21+
if [ $SMS ];then
22+
cmd+="-sms $SMS "
23+
fi
24+
25+
if [ $DEVICE ];then
26+
cmd+="-device $DEVICE "
27+
fi
28+
29+
eval $cmd

scripts/linux_run.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
read -p "Enter your bot qq:" uin
4+
read -p "Enter your bot password:" pass
5+
6+
# 根据情况修改使用哪个
7+
Go-Mirai-Client-linux-amd64 -uin "$uin" -pass "$pass"

scripts/windows_run.bat

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
@echo off
2+
3+
echo ================================================
4+
echo Go-Mirai-Client
5+
echo You can modify this file to login automatically.
6+
echo You can copy this file to manage many bots.
7+
echo https://github.com/ProtobufBot/go-Mirai-Client
8+
echo ================================================
9+
10+
set port=9000
11+
12+
set /p uin=QQ:
13+
set /p pass=Password:
14+
set /p port=Port(9000-60000):
15+
16+
17+
Go-Mirai-Client-windows-amd64.exe -uin %uin% -pass %pass% -port %port%

0 commit comments

Comments
 (0)