#Set some variables
export P4CLIENT=ws1
export P4PORT=localhost:1666
export P4CONFIG=.p4config
Echo "Setting up the server"
mkdir server
cd server
p4d -r . -p $P4PORT -vserver=3 -L log.txt &
Mkdir ws
Cd ws
Echo P4USER=jen > $P4CONFIG
Echo P4PORT=$P4PORT >> $P4CONFIG
Echo P4CLIENT=$P4CLIENT >>$P4CONFIG
p4 -ztag info
Echo "Creating service users"
#Create service user used by commit server
p4 --field User=commit_service Type=Service p4 user -o | p4 user -i
#Stop the server once setup is complete
Echo "Stopping server"
P4 admin stop