summaryrefslogtreecommitdiffstats
path: root/tools/run-many.sh
blob: 4d4bf1e42591c48c175a063fb1681ded2d3fe490 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

# to use this script add 127.0.0.2 address to loopback interface and add
# following lines to hosts file
# 127.0.0.1	localhost s1
# 127.0.0.2	s2
# for mac: ifconfig lo0 alias 127.0.0.2

tmux \
	new-session  "go run cmd/daemon/main.go -a 127.0.0.1:9999 -n s1; read" \; \
	split-window "go run cmd/daemon/main.go -a 127.0.0.2:9999 -n s2; read" \; \
	split-window "sleep 0.5; go run cmd/client/main.go -u u1 -a s1:9999; read" \; \
	split-window "sleep 0.5; go run cmd/client/main.go -u u2 -a s2:9999; read" \; \
	select-layout tiled;