?? extractfilesforuncommittedlevel
字號:
#!/usr/bin/ksh## SAMPLE NAME: extractFilesForUncommittedLevel## FUNCTIONS: This sample shell script extracts the uncommitted files# associated with a specific uncommitted level in a release,# and places them in the path specified by # the relativePathName parameter.# This is equivalent of doing a delta extract on the uncommitted# level.## USAGE: extractFilesForCommittedLevel releaseName levelName relativePathName## ENVIRONMENT VARIABLE(S): CMVC_FAMILY [CMVC_BECOME]## 5765-207 (C) COPYRIGHT International Business Machines Corp. 1993,1998# 5765-202 (C) COPYRIGHT International Business Machines Corp. 1993,1998# 5622-063 (C) COPYRIGHT International Business Machines Corp. 1993,1998# All Rights Reserved# Licensed Materials - Property of IBM## US Government Users Restricted Rights - Use, duplication or# disclosure restricted by GSA ADP Schedule Contract with IBM Corp.## NOTICE TO USERS OF THE SOURCE CODE EXAMPLES## INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THE SOURCE CODE# EXAMPLES, BOTH INDIVIDUALLY AND AS ONE OR MORE GROUPS, "AS IS" WITHOUT# WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT# LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A# PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE# OF THE SOURCE CODE EXAMPLES, BOTH INDIVIDUALLY AND AS ONE OR MORE GROUPS,# IS WITH YOU. SHOULD ANY PART OF THE SOURCE CODE EXAMPLES PROVE# DEFECTIVE, YOU (AND NOT IBM OR AN AUTHORIZED RISC System/6000* WORKSTATION# DEALER) ASSUME THE ENTIRE COST OF ALL NECESSARY SERVICING, REPAIR OR# CORRECTION.## * RISC System/6000 is a trademark of International Business Machines# Corporation.## /usr/lpp/cmvc/samples/extractFilesForUncommittedLevel## Validation of input parameters and environment variables.if [ $# -eq 0 ]then print "usage: $0 releaseName levelName relativePathName\n" print "This sample shell script extracts the uncommitted files" print "associated with a specific uncommitted level in a release" print "and places them in the path specified by " print "the relativePathName parameter." print "This is equivalent of doing a delta extract on the uncommitted level." exit 1fiif [ -z "$CMVC_FAMILY" ]then print "The CMVC family must be set with the CMVC_FAMILY environment variable." exit 1fi#if [ $# -ne 3 ]then print "Provide a levelName, a releaseName, and a relativePathName" print "as input parameters.\n" exit 1fireleaseName=$1levelName=$2relative=$3PATHNAME=SAVEPATHNAME=# Find out the files in the uncommitted level/release and extract themReport -view ChangeView -where "trackID in (select trackId from levelMemberView where levelName='$levelName' and releaseName='$releaseName') order by fileId, versionId ASC" -raw > /tmp/cv$$while read linedo PATHNAME=`echo $line | cut -d'|' -f5 ` VERSION=`echo $line | cut -d'|' -f4 ` print "Extracting file: $PATHNAME uncommittedVersion: $VERSION" File -extract "$PATHNAME" -relative $relative -release $releaseName -version $VERSIONdone </tmp/cv$$# Cleanup the temporary file[ -r /tmp/cv$$ ] && rm -f /tmp/cv$$print "The delta extraction of the uncommitted level is done!"exit 0### end of file ###
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -