diff options
author | Matt Strapp <strap012@umn.edu> | 2021-04-30 08:39:48 -0500 |
---|---|---|
committer | Matt Strapp <strap012@umn.edu> | 2021-04-30 08:39:48 -0500 |
commit | ef17bf01e7471f27c93d3080e80adf228569a924 (patch) | |
tree | 031d91de4d94ac3f7c9e4ae63e24c00467f74ef2 | |
parent | Delete batchfile (diff) | |
download | csci4511w-ef17bf01e7471f27c93d3080e80adf228569a924.tar csci4511w-ef17bf01e7471f27c93d3080e80adf228569a924.tar.gz csci4511w-ef17bf01e7471f27c93d3080e80adf228569a924.tar.bz2 csci4511w-ef17bf01e7471f27c93d3080e80adf228569a924.tar.lz csci4511w-ef17bf01e7471f27c93d3080e80adf228569a924.tar.xz csci4511w-ef17bf01e7471f27c93d3080e80adf228569a924.tar.zst csci4511w-ef17bf01e7471f27c93d3080e80adf228569a924.zip |
Fix both scripts not using the right ws ports given
-rw-r--r-- | start.ps1 | 1 | ||||
-rwxr-xr-x | start.sh | 8 |
2 files changed, 8 insertions, 1 deletions
@@ -3,6 +3,7 @@ param ( [Parameter(Mandatory=$true)][int]$w, [switch]$h ) +$w-- if ($h) { Write-Output "Usage:" Write-Output "-s (Server port)" @@ -2,19 +2,25 @@ #Bash script for automating evaluate echo "Dots and Boxes Agent Shell Script: Ver 1.0RC2: adding options" -while getopts 'w:p:h:' opt; do +while getopts ':w:p:h:' opt; do case $opt in w) WEB=$OPTARG;; p) PORT=$OPTARG;; h) echo "Usage: ./start.sh -w (web port) -p (starting agent port)" exit 0;; + \?) + echo "Invalid option: -$OPTARG" >&2 + echo "Usage: ./start.sh -w (web port) -p (starting agent port)" + exit 1;; *) echo "Usage: ./start.sh -w (web port) -p (starting agent port)" exit 1;; + esac done (python3 python/dotsandboxes/dotsandboxesserver.py $WEB) >> server.log & echo "Web server running on http://127.0.0.1:$WEB" +PORT=`expr $PORT - 1`; for a in 1 2 do |