From 8bebafccdfe97f5e31b0a3260e47de6b8adaae25 Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Thu, 29 Apr 2021 11:10:47 -0500 Subject: Allow non-log shell usage --- start.sh | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/start.sh b/start.sh index 0f5c0c8..5d37d14 100755 --- a/start.sh +++ b/start.sh @@ -29,19 +29,28 @@ do ;; esac done -echo "" -read -p "Columns of board: " c -read -p "Rows of board: " r -read -p "Number of games to run: " n -read -p "Output file name (please include '.csv'): " o -echo "" -read -p "This will now run with the given arguments in the foreground. Hit enter to confirm." TRASH -(python3 python/evaluate.py -c $c -r $r -n $n -o $o ws://127.0.0.1:20001 ws://127.0.0.1:20002) > evaluate.log -echo "" -echo "Log of evaluate python script located in evaluate.log" -echo "Evaluate has finished! Check the output in $o" -echo "Press enter to finish." +read "Do you want to run the logger? (Y/N)" log +case $log in + 'Y' | 'y') + echo "" + read -p "Columns of board: " c + read -p "Rows of board: " r + read -p "Number of games to run: " n + read -p "Output file name (please include '.csv'): " o + echo "" + read -p "This will now run evaluate.py with the given arguments in the foreground. Hit enter to confirm." TRASH + (python3 python/evaluate.py -c $c -r $r -n $n -o $o ws://127.0.0.1:20001 ws://127.0.0.1:20002) > evaluate.log + echo "" + echo "Log of evaluate python script located in evaluate.log" + echo "Evaluate has finished! Check the output in $o" + ;; + *) + echo "Web interface available at http://127.0.0.1:8080" + ;; + + +echo "Press enter to exit, killing all agents and the web server." read TRASH; trap "exit" INT TERM -- cgit v1.2.3