- #!/usr/bin/perl
- #Script to autosync Cadence library clients
- #Called from an opus session
- #Args: client name, update interval, parent pid
- $client=$ARGV[0];
- $interval=$ARGV[1];
- $ppid=$ARGV[2];
- if( (!$client || !$interval)) {
- print "arguments error\n";
- exit(1);
- }
- while() {
- do {
- &checkpid;
- $cmd="p4 -c $client sync >/dev/null 2>&1";
- system($cmd);
- sleep $interval;
- }
- }
- sub checkpid {
- my $cmd;
- $cmd="ps -al | awk '{print $3}' | grep $ppid >/dev/null 2>&1";
- system($cmd);
- # Check exit status
- #print "Status $?\n";
- if($? eq 256) {
- # print "Exiting\n";
- exit(0);
- }
- }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 5093 | Hari Krishna Dara |
Populating perforce branch. I will be adding p4admin files to it. |
20 years ago | |
//guest/perforce_software/cdsp4/release/2.2/Utils/cdsautosync | |||||
#1 | 1705 | Shiv Sikand | Added missing utilities for branch management | 23 years ago |