diff --git a/run_all_server.sh b/run_all_server.sh index 12a51382..b8f7b4b5 100755 --- a/run_all_server.sh +++ b/run_all_server.sh @@ -15,7 +15,7 @@ run_server() { # 导航到相应的目录 cd server/$server_name - go build -race + go build -ldflags "-w -s" -gcflags "-N -l" [ -f .gitignore ] || echo $server_name > .gitignore # 使用 screen 运行 go run .go screen -dmS $server_name -L ./$server_name @@ -24,7 +24,8 @@ run_server() { cd - > /dev/null } -find /tmp/go-build* -mmin +5 -delete +find /tmp/go-build* -mmin +5 -exec rm -rf {} + +find /tmp/go-link* -mmin +5 -exec rm -rf {} + # 列出所有服务器目录 server_dirs=() # 初始化一个空数组