This repository was archived by the owner on Sep 19, 2021. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414# See the License for the specific language governing permissions and
1515# limitations under the License.
1616
17- LOCAL_MACHINE=" localhost@2007"
17+ HOST=" $1 "
18+ PORT=" $2 "
1819
19- cd ' ./bin'
20+ if [[ " $HOST " == " " || " $PORT " == " " ]] ; then
21+ echo ' usage: <HOST> <PORT>'
22+ exit 1
23+ fi
2024
21- java codeu.chat.ClientMain " $LOCAL_MACHINE "
25+ cd ' ./bin'
26+ java codeu.chat.ClientMain " $HOST @$PORT "
Original file line number Diff line number Diff line change 1414# See the License for the specific language governing permissions and
1515# limitations under the License.
1616
17- TEAMS_FILE=" $( pwd) /teams"
17+ PORT=" $1 "
18+ TEAM_FILE=" $2 "
19+
20+ if [[ " $PORT " == " " || " $TEAM_FILE " == " " ]] ; then
21+ echo ' usage: <PORT> <TEAM FILE>'
22+ exit 1
23+ fi
24+
25+ if [ ! -f " $TEAM_FILE " ] ; then
26+ echo " No file at $TEAM_FILE "
27+ exit 1
28+ fi
1829
1930cd ' ./bin'
20- java codeu.chat.RelayMain ' 2008 ' " $TEAMS_FILE "
31+ java codeu.chat.RelayMain " $PORT " " $TEAM_FILE "
Original file line number Diff line number Diff line change 1414# See the License for the specific language governing permissions and
1515# limitations under the License.
1616
17+ TEAM_ID=" $1 "
18+ TEAM_SECRET=" $2 "
19+ PORT=" $3 "
20+
21+ if [[ " TEAM_ID" == " " || " $TEAM_SECRET " == " " || " $PORT " == " " ]] ; then
22+ echo ' usage: <TEAM ID> <TEAM SECRET> <PORT>'
23+ exit 1
24+ fi
25+
1726cd ' ./bin'
18- java codeu.chat.ServerMain " 100.101 " " ABABAB " " 2007 "
27+ java codeu.chat.ServerMain " $TEAM_ID " " $TEAM_SECRET " " $PORT "
You can’t perform that action at this time.
0 commit comments