#!/bin/bash
rm -rf /metadata1/p4
rm -rf /metadata2/p4
rm -rf /logs/p4
rm -rf /depotdata/p4
rm -rf /depotdata/sdp/*
rm -rf /p4/ssl
rm -f /p4/p4.crontab*

unlink /p4/1
unlink /p4/common
unlink /p4/sdp

rsync -av /home/rjackson/public/russell_jackson/sdp/ /depotdata/sdp
cd /depotdata/sdp/Server/Unix/p4/common/bin
wget ftp://ftp.perforce.com/perforce/r17.1/bin.linux26x86_64/p4
wget ftp://ftp.perforce.com/perforce/r17.1/bin.linux26x86_64/p4d
cd /depotdata/sdp/Server/Unix/setup
./mkdirs.sh 1
/p4/1/bin/p4d_1_init start
su - perforce
