#!/bin/bash declare Version=1.1.5 declare Password="F@stSCM!" echo "Running ${0##*/} v$Version." # Installing Helix Swarm and Git Fusion packages. sudo yum install perforce-git-fusion -y sudo yum install perforce-swarm -y sudo yum install perforce-cli -y # Note: Installing the 'perforce-server' package creates the 'perforce' user with a home dir # of /opt/perforce/servers. We change the home directory below to the SDP standard. sudo yum install perforce-server -y echo "Allowing user 'perforce' sudo privileges." echo 'perforce ALL=(ALL) NOPASSWD:ALL' > /tmp/perforce sudo chmod 0700 /tmp/perforce sudo chown root:root /tmp/perforce sudo mv /tmp/perforce /etc/sudoers.d/. echo "Creating initial SDP dirs." declare DirList="/p4 /depotdata/reset /depotdata/p4/common/bin/cbd /metadata /logs" mkdirCmd="sudo /bin/mkdir -p $DirList" echo "Running: $mkdirCmd" $mkdirCmd chownCmd="sudo chown -R perforce:perforce $DirList" echo "Running: $chownCmd" $chownCmd echo "Setting home directory for 'perforce' user to /p4." usermod -d /p4 perforce echo "Setting up environment niceties for perforce user." BASH_PROFILE=/tmp/.bash_profile.perforce echo '[[ -f /etc/bashrc ]] && source /etc/bashrc' > $BASH_PROFILE echo '[[ -f ~/.bashrc ]] && source ~/.bashrc' >> $BASH_PROFILE sudo chown perforce:perforce $BASH_PROFILE sudo mv -f $BASH_PROFILE ~perforce/.bash_profile BASHRC=/tmp/.bashrc.perforce echo '[[ -f /p4/common/bin/p4_vars ]] && source /p4/common/bin/p4_vars 1'> $BASHRC echo "export PS1='\$USER@\${HOSTNAME%%.*}:\$PWD '" >> $BASHRC echo "alias md='/bin/mkdir -p'" >> $BASHRC echo "alias rd=/bin/rmdir" >> $BASHRC echo "alias o='p4 opened ...'" >> $BASHRC echo "alias go='cd /p4/common/bin/cbd/test && source manual_test_env.sh'" >> $BASHRC echo 'set -o vi' >> $BASHRC sudo chown perforce:perforce $BASHRC sudo mv -f $BASHRC ~perforce/.bashrc echo "Setting password for perforce user to: $Password" echo "perforce:$Password" | sudo chpasswd echo "Setting up environment niceties for vagrant user." echo "alias go='sudo su - perforce'" >> ~/.bashrc echo 'set -o vi' >> ~/.bashrc exit 0
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 21706 | Sven Erik Knop |
Populate //cbd/main/... .... |