Linux / UNIX Tech Support Forum
This is a discussion on Ksh : Shell script to checkout files from CVS repository . within the Shell scripting forums, part of the Development/Scripting category; Can anyone give me a script to checkout files from cvs repository.i am working on k shell. CVSROOT=server:uid@server: port/repository path ...
|
|||||||
| Shell scripting You can discuss the shell scripting, request shell scripts and scripting techniques |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Can anyone give me a script to checkout files from cvs repository.i am working on k shell.
CVSROOT=server:uid@server: port/repository path i use cvs co command for checking out .After checking out the files i have to check their logs for correct revision .so please help with a script to checkout and interpret the logs for correct revision of files. |
| Sponsored Links | ||
|
|
|
||||
|
I use something as follows in bash / sh:
Code:
... cvs -z6 -Q -d:$DIR$CVSDIR checkout -r $CVSVERSION -d $TCVS $TARGET$1 rval=$? if [ "$rval" -ne 0 ]; then echo "cvs checkout failed for $1 $CVSVERSION" else echo "Done..." fi ... HTH
__________________
Vivek Gite Linux Evangelist |
|
|||
|
My requirement is like this
i have to do a build for selected files from repository using a build script so i need to just checkout those files from repository.But before doing the build i need to check the version of the files being same as requested for the build.if the versions are not same i dont have to proceed with the build.so i need to checkout those sleceted files and after that i need to check their logs for particular version (using grep) and after that i need to run that build script for these files .so please provide me with a script for K shell. The build script is just a command . |
|
|||
|
Quote:
$ cvs rlog acebill/utils/crm_ace_sync/billing_recovery/ace/cfg/TX_REPORT.bxm RCS file: /appl/pkg1/scm/cvs/reps/acebill/cvs/acebill/utils/crm_ace_sync/billing_recovery/ace/cfg/Attic/TX_REPORT.bxm,v head: 1.1 branch: locks: strict access list: symbolic names: Branch_09_06: 1.1.0.2 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2009/04/02 06:49:03; author: sm7859; state: dead; branches: 1.1.2; file TX_REPORT.bxm was initially added on branch Branch_09_06. ---------------------------- revision 1.1.2.1 date: 2009/04/02 06:49:03; author: sm7859; state: Exp; lines: +78 -0 Commit no:3608: WR# PR24229630 Commit no:3608: DEF# CRM Data Cleanup ================================================== =========================== i need to check the correct revision for a file from this message only how to use grep on this to check for revision numbers which should be taken as a parametre in the script . |
|
||||
|
Have you tried out?
Code:
cvs rlog acebill/utils/crm_ace_sync/billing_recovery/ace/cfg/TX_REPORT.bxm | grep revision Code:
cvs rlog acebill/utils/crm_ace_sync/billing_recovery/ace/cfg/TX_REPORT.bxm | egrep "^revision" Code:
cvs rlog acebill/utils/crm_ace_sync/billing_recovery/ace/cfg/TX_REPORT.bxm | grep revision | awk '{ print $2}'
__________________
Vivek Gite Linux Evangelist |
|
|||
|
all the codes give me the revisions but how should i check for the latest revision for eg if for a file the available revisions in the log message are 1.1
1.1.2.1 1.1.2.2 1.2 1.3 1.4 and i require only 1.4 (the latest one for the build ).i am very new to unix please help me with this .thanx in advance. |
|
|||
|
how to do it for a large number of files specially the branched one like 1.1.2.1,
1.1.2.2, 1.2.2.1, 1.2.2.2. here i would need 1.2.2.2 for build .please help me to structure the loop for large number of files which i have in excel sheet.i have to pass it as parametre or i have to type the command for each of the files .i am new to unix. Last edited by huntethan; 04-05-2009 at 07:27 PM. |
![]() |
| Tags |
| cvs shell script , ksh , ksh cvs script , shell scripting |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Shell script tp Log files last line | kasimani | Shell scripting | 3 | 24-03-2009 03:25 PM |
| shell script to zip old files and then delete | shankar43 | Shell scripting | 2 | 13-03-2009 09:10 AM |
| Shell script for automatic conversion of files in tar files | kasimani | Shell scripting | 2 | 08-02-2007 03:45 PM |
| shell script to open log files and check for faults | trueman82 | Shell scripting | 1 | 23-11-2006 02:35 AM |
| shell script that parses multiple log files and checks for a | Anonymous | Shell scripting | 1 | 15-11-2006 09:38 PM |