copy_missing_shelf_files.sh #1

  • //
  • guest/
  • russell_jackson/
  • sdp/
  • Server/
  • Unix/
  • p4/
  • common/
  • bin/
  • copy_missing_shelf_files.sh
  • View
  • Commits
  • Open Download .zip Download (468 B)
#!/bin/bash

export CHANGELIST=${CHANGELIST:-Undefined} 
export CHANGELIST=${1:-$CHANGELIST} 
if [[ $CHANGELIST == Undefined ]]; then 
   echo " parameter not supplied." 
   echo "You must supply the shelf changelist number as a parameter to this script." 
   exit 1 
fi 

for depotFile in $(p4 -ztag -F %depotFile% files @=$CHANGELIST); do
  lbrFile=$(p4 -F %lbrPath% fstat -Ob $depotFile@=$CHANGELIST)
  rsync -av $lbrFile ${RSYNCUSER}@${COMMITSERVER}:$lbrFile
done
# Change User Description Committed
#1 29732 Russell C. Jackson (Rusty) Add script to copy missing shelf files to the commit server.