SetupDevWorkspaces.tt.sh #1

  • //
  • guest/
  • perforce_software/
  • helix-installer/
  • main/
  • test/
  • SetupDevWorkspaces.tt.sh
  • View
  • Commits
  • Open Download .zip Download (1 KB)
#!/bin/bash
#------------------------------------------------------------------------------
set -u

function msg () { echo -e "$*"; }
function bail () { msg "\\n${1:-Unknown Error}\\n"; exit "${2:-1}"; }

declare Version=1.0.1

msg "Running ${0##*/Version} v$Version on host ${HOSTNAME%%.*} at $(date)."

[[ $(whoami) == root ]] || bail "Not running as root. Bailing."
[[ ${HOSTNAME%%.*} == "helix-"* ]] || bail "Run this only on a test VM named helix-<os>. Bailing."

source /p4/common/bin/p4_vars 1
export P4CONFIG=.p4config

mkdir /root/helix-installer
mkdir /root/sdp

echo -e "
P4CLIENT=tom_tyler.helix-ubuntu16.hi.tmp
P4PORT=public.perforce.com:1666
P4TICKETS=/root/helix-installer/.p4tickets
P4USER=tom_tyler
net.autotune=1" > ~/helix-installer/.p4config

echo -e "
P4CLIENT=tom_tyler.helix-ubuntu16.sdp.tmp
P4PORT=public.perforce.com:1666
P4TICKETS=/root/sdp/.p4tickets
P4USER=tom_tyler
net.autotune=1" > 
~/sdp/.p4config

cd ~/sdp
ln -f -s ../helix-installer/.p4tikcets

p4 -sync -f
cd ~/helix-installer
p4 -sync -f
# Change User Description Committed
#2 27427 C. Thomas Tyler Released SDP 2021.2.27425 (2021/02/09).
Copy Up using 'p4 copy -r -b perforce_software-helix-installer-dev'.
#1 25871 C. Thomas Tyler Released Helix Installer 2019.3.25869 (2019/07/23)
//guest/perforce_software/helix-installer/dev/test/SetupDevWorkspaces.tt.sh
#1 25869 C. Thomas Tyler Added script to setup my personal dev workspaces on the test VMs
after they get reset in test run.