2 ################################################################################
5 # Description: Lists the clearcase files that relate to label(s)
6 # Author: Andrew@DeFaria.com
7 # Created: Thu Dec 13 19:11:15 2001
11 # (c) Copyright 2001, Andrew@DeFaria.com, all rights reserved
13 ################################################################################
14 # Set me to command name
17 # Source /etc/site_parms
18 if [ -f /etc/site_parms ]; then
21 echo "$me: WARNING: /etc/site_parms does not exist!"
25 adm_base="$SITE_TOOLS_PATH/adm"
28 adm_fpath=${adm_fpath:-$adm_base/functions}
34 display "$me: [ -view <viewtag> ] <label> [<label>]"
38 display "-view\tViewpath to use (default $SITE_OFFICIAL_VIEW)"
39 display "<label>\tLabel(s) to search for"
46 if [ "$1" = "-v" -o "$1" = "-view" ]; then
51 vob="$SITE_SNAPSHOT_VIEW_PATH/$SITE_OFFICIAL_VIEW/salira"
54 if [ ! -d "$vob" ]; then
55 echo "$me: Error: Unable to cd to vob $vob"
65 view_name=$(cleartool pwv -short)
68 echo "Files labeled $label:"
69 cleartool find -all -version "lbtype($label)" -print | tr "\\\\" "/" >/tmp/$me.$$
73 while read element_version; do
75 # Chop off leading view path
76 element_version=$(echo ${element_version##*$view_name})
77 # Extract element portion
78 element=$(echo $element_version | cut -f1 -d@)
79 # Extract version portion
80 version=$(echo $element_version | cut -f3 -d@)
81 echo -e "\t$element\t$version"
85 echo "No files labeled $label"
86 elif [ $i -eq 1 ]; then
87 echo "1 file labeled $label"
89 echo "$i files labeled $label"