Przeglądaj źródła

启动脚本加入参数检查,没配置文件参数的话提示错误!

tanghai 9 lat temu
rodzic
commit
47127af3c9
2 zmienionych plików z 14 dodań i 0 usunięć
  1. 7 0
      Run.sh
  2. 7 0
      Start.sh

+ 7 - 0
Run.sh

@@ -1,5 +1,12 @@
 #!/bin/bash
 
+if [$1 = ""]
+then
+    echo "please input config file! for example:"
+    echo "bash Run.sh Config/StartConfig/192.168.12.188.txt"
+    exit 9
+fi
+
 xbuild ./Server/Server.sln
 cd Bin
 cmake ..

+ 7 - 0
Start.sh

@@ -1,5 +1,12 @@
 #!/bin/bash
 
+if [$1 = ""]
+then
+    echo "please input config file! for example:"
+    echo "bash Start.sh Config/StartConfig/192.168.12.188.txt"
+    exit 9
+fi
+
 cd Bin
 ps -ef | grep App.exe | awk '{print $2}' | xargs kill -9
 mono --debug App.exe --appId=1 --appType=Manager --config=../$1