#!/bin/sh # # RUN_CODE_CHANGE_REPORT.sh # # Ask if the user wants to run the CODE_CHANGE report # now or not. Only the VOB owner can run this "expensive" # report. The CODE_CHANGE.rpt files can be implemented # as a unique file_type or not. I choose to do so to make # the application of the trigger_type "global" to any file # named "CODE_CHANGE.rpt" in any directory. One can be # placed in any/all directory(ies) to allow reports to be # run on any small/large peice of the code. # # NOTE: The trigger code relies on the tool CODE_CHANGE_REPORT.sh # # NOTE: The trigger code can be implemented to rely on the trigger # INHIBIT.tgr # # Author: Charles W. Clarke III (ABS) # email: charles@abs-consulting.com # URL: http://www.abs-consulting.com # Date: Aug. 16, 1996 ############################################################ # History: 08/16/96 : Created for A Better Solution, Inc. ############################################################ VOB_OWNER=`cleartool describe -vob $CLEARCASE_VOB_PN | \ grep " owner " | awk '{ print $2 }'` if [ $VOB_OWNER != $CLEARCASE_USER ] then echo "Only the VOB_OWNER ($VOB_OWNER) can run this report." exit 0 fi REPORT_COMMAND="`dirname $0`/../TOOLS/CODE_CHANGE_REPORT.sh" TARGET_DIRECTORY=`pwd` PROMPT="Report checked out. Would you like to run the report right now?" clearprompt yes_no -def yes -mask yes,no -pro "$PROMPT" if [ $? = 0 ] then clearprompt yes_no -def yes -mask yes -pro "OK, I will notify when done" ######################################################## # Notification of completion is within $REPORT_COMMAND # ######################################################## $REPORT_COMMAND $TARGET_DIRECTORY > $CLEARCASE_PN & fi exit 0