#!/bin/bash # Intended to be run on a replica machine to rsync shelved files where the verify -t schedules the wrong file. export SDP_INSTANCE=${SDP_INSTANCE:-Undefined} export SDP_INSTANCE=${1:-$SDP_INSTANCE} if [[ $SDP_INSTANCE == Undefined ]]; then echo "Instance parameter not supplied." echo "You must supply the Perforce instance as a parameter to this script." exit 1 fi source /p4/common/bin/p4_vars $SDP_INSTANCE $P4BIN info | grep insensitive > /dev/null 2>&1 if [[ $? -eq 0 ]]; then grep MISSING $LOGS/p4verify.log | cut -d "#" -f 1 | sed "s#^info: /##g" | sed "s/\(.*\)/\L\1/g" | sed "s#\(^.*$\)#rsync -av \${RSYNCUSER}@\${P4MASTER}:/p4/\${SDP_INSTANCE}/depots\1,d/ /p4/\${SDP_INSTANCE}/depots\1,d/#g" > temp_rsync.sh else grep MISSING $LOGS/p4verify.log | cut -d "#" -f 1 | sed "s#^info: /##g" | sed "s#\(^.*$\)#rsync -av \${RSYNCUSER}@\${P4MASTER}:/p4/\${SDP_INSTANCE}/depots\1,d/ /p4/\${SDP_INSTANCE}/depots\1,d/#g" > temp_rsync.sh fi bash temp_rsync.sh rm temp_rsync.sh
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#2 | 23681 | Russell C. Jackson (Rusty) |
Added call to rsync_missing to the end of p4verify.sh Renamed rsync_shelves.sh to rsync_missing.sh to be more accurate. |
||
#1 | 23680 | Russell C. Jackson (Rusty) |
New script to copy over shelved files that verify -t schedules incorrectly. Defaulted RSYNCUSER to OSUSER to eliminate the need to check to see if RSYNCUSER is set. |