Removed /usr/local from CDPATH
[clearscm.git] / clients / HP / packet2vob
1 #!/usr/bin/bash
2 ################################################################################
3 #
4 # File:         packet2vob
5 # RCS:          $Header: packet2vob,v 1.1 97/04/23 13:11:08 defaria Exp $
6 # Description:  A script to display what vob the packet is for
7 # Author:       Andrew DeFaria, California Language Labs
8 # Created:      Fri Feb 28 07:53:14 PST 1997
9 # Modified:     
10 # Language:     Korn Shell
11 # Package:      N/A
12 # Status:       Experimental (Do Not Distribute)
13 #
14 # (c) Copyright 1995, Hewlett-Packard Company, all rights reserved.
15 #
16 ################################################################################
17 alias ct=/usr/atria/bin/cleartool
18 alias mt=/usr/atria/bin/multitool
19
20 if [ $# -eq 1 ]; then
21   packets="*"
22 else
23   packets="$@"
24 fi
25
26 if [ ! -f $RGY/vob_object ]; then
27   print -u2 "Unable to to interogate the registry ($RGY/vob_object)"
28   exit 1
29 fi
30
31 for packet in $packets; do
32   familyid=$(mt lspacket $packet 2> /dev/null | grep "family" | awk '{print $5}')
33   uuid=$(grep $familyid $RGY/vob_object | cut -f4 -d';' | cut -c14-)
34   vob=$(ct lsvob -long -uuid $uuid | grep "Tag:" | awk '{print $2}')
35   host=$(ct lsvob -long -uuid $uuid | grep "Server host:" | awk '{print $3}')
36   print "$packet $host:$vob"
37 done