#!/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 > /dev/null 2>&1 rm temp_rsync.sh
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#4 | 27796 | Russell C. Jackson (Rusty) | Added P4TMP to temp_rsync.sh to make sure it doesn't fill up the Perforce user's home directory. | ||
#3 | 27627 | Russell C. Jackson (Rusty) | Changed P4MASTER to P4MASTERHOST | ||
#2 | 24154 | Russell C. Jackson (Rusty) | Added +x to a few files. | ||
#1 | 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. |
||
//guest/russell_jackson/sdp/Server/Unix/p4/common/bin/rsync_shelves.sh | |||||
#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. |