mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-24 06:54:13 +00:00
Remove admin/BuildTools; none of this is pertinent anymore
This commit is contained in:
parent
4ca27ae51a
commit
0ec76e2912
47 changed files with 0 additions and 6174 deletions
|
@ -1,144 +0,0 @@
|
||||||
#! /usr/local/bin/perl
|
|
||||||
|
|
||||||
eval "exec /usr/local/bin/perl -S $0 $*"
|
|
||||||
if $running_under_some_shell;
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
#
|
|
||||||
# File: ListTheTree <source tree>
|
|
||||||
# RCS: $XConsortium: ListTheTree /main/3 1995/10/30 13:43:24 rswiston $
|
|
||||||
# Author: Jim Andreas Hewlett-Packard, OSSD-CV
|
|
||||||
# Created: 1/15/92
|
|
||||||
# Modified by: Marc Ayotte Hewlett-Packard, OSSD-CV (perlizer)
|
|
||||||
# Language: N/A
|
|
||||||
# Package: N/A
|
|
||||||
# Status: CDE distributed
|
|
||||||
#
|
|
||||||
# (c) Copyright 1993, Hewlett-Packard Company, all rights reserved.
|
|
||||||
#
|
|
||||||
# Description: This file does 2 things:
|
|
||||||
# 1) List the source tree's structure.
|
|
||||||
# This structure is placed into the source tree's
|
|
||||||
# directory as :TreeListing.
|
|
||||||
# 2) Creates a listing of all of the files locked in the
|
|
||||||
# source tree and places it in :TreeListing.locks.
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
if ($ARGV[0]) {
|
|
||||||
$TREE = $ARGV[0];
|
|
||||||
#
|
|
||||||
# if not / relative get pwd path
|
|
||||||
#
|
|
||||||
if ($TREE !~ m%^\/%) {
|
|
||||||
print STDERR " Must be a / related path e.g -> /foo. Sorry!\n";
|
|
||||||
exit 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
die " USAGE ListTheTree <source directory>\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
# put /usr/local/bin in the path for Rcslocks
|
|
||||||
$ENV{'PATH'} = "/x/cdesrc/admin/bin:/usr/local/bin:$ENV{'PATH'}";
|
|
||||||
|
|
||||||
if (! chdir("$TREE")) {
|
|
||||||
die " ERROR -> Couldn't change directory to $TREE.\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
######################
|
|
||||||
# get the tree listing
|
|
||||||
######################
|
|
||||||
system ("find . -print > :TreeListing.new");
|
|
||||||
unlink(":TreeListing");
|
|
||||||
if (! rename(":TreeListing.new",":TreeListing")) {
|
|
||||||
print " WARNING -> couldn't mv :TreeListing.new to :TreeListing.\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
###################################
|
|
||||||
# find the locked files in the tree
|
|
||||||
###################################
|
|
||||||
unlink(":TreeListing.locks.new");
|
|
||||||
open(NLOCK,">>$TREE/:TreeListing.locks.new");
|
|
||||||
print NLOCK "List of locked files in $TREE\n\n";
|
|
||||||
@dirs=(`find . -type d -print`);
|
|
||||||
|
|
||||||
foreach $dir (@dirs) {
|
|
||||||
undef(@rcsLocks);
|
|
||||||
chop($dir);
|
|
||||||
if (chdir("$dir")) {
|
|
||||||
@rcsLocks = (`Rcslocks -v`);
|
|
||||||
# only list directory if there are locks
|
|
||||||
if (@rcsLocks) {
|
|
||||||
print NLOCK "$dir\n";
|
|
||||||
while (@rcsLocks) {
|
|
||||||
$lock = shift(@rcsLocks);
|
|
||||||
print NLOCK " $lock";
|
|
||||||
}
|
|
||||||
print NLOCK "\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
print " WARNING -> could not cd to ${TREE}/${dir}\n";
|
|
||||||
print " $!\n";
|
|
||||||
}
|
|
||||||
chdir("$TREE");
|
|
||||||
}
|
|
||||||
|
|
||||||
unlink("$TREE/:TreeListing.locks");
|
|
||||||
rename("$TREE/:TreeListing.locks.new","$TREE/:TreeListing.locks");
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# get changes from last listing
|
|
||||||
# check file $TREE/changestamp
|
|
||||||
#
|
|
||||||
$cstamp = "${TREE}/changestamp";
|
|
||||||
if ( -f "${TREE}/changestamp" ) {
|
|
||||||
$laststamp = `cat $cstamp`;
|
|
||||||
chop $laststamp;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$date = `date +%y%m%d`;
|
|
||||||
chop $date;
|
|
||||||
$laststamp = "${date}0001";
|
|
||||||
$dip = `echo "$laststamp" >$cstamp`;
|
|
||||||
$date = `date +%m%d0001`;
|
|
||||||
chop $date;
|
|
||||||
system "touch $date $cstamp";
|
|
||||||
}
|
|
||||||
$curstamp = `date +%y%m%d%H%M`;
|
|
||||||
chop $curstamp;
|
|
||||||
|
|
||||||
unlink("$TREE/:TreeListing.changes.new");
|
|
||||||
open(NCHANGE,">>$TREE/:TreeListing.changes.new");
|
|
||||||
print NCHANGE "List of changed files in $TREE\n\n";
|
|
||||||
@allfiles=(`find . -follow -name "*,v" -newer $cstamp -print`);
|
|
||||||
foreach $file (@allfiles) {
|
|
||||||
chop $file;
|
|
||||||
if (open($RCSFILE,"$file")) {
|
|
||||||
NEXTLINE:
|
|
||||||
while ($line = <$RCSFILE>) {
|
|
||||||
chop $line;
|
|
||||||
if ($line !~ m%^date%) {
|
|
||||||
next NEXTLINE;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$lastdate = $line;
|
|
||||||
$author = $line;
|
|
||||||
$lastdate =~ s%^.* (\d+\.\d+\.\d+\.\d+\.\d+).*$%\1%;
|
|
||||||
$lastdate =~ s%\.%%g;
|
|
||||||
if ($lastdate > $laststamp) {
|
|
||||||
$author =~ s%^.*author (.*); .*;$%\1%;
|
|
||||||
print NCHANGE "$file <-> $author\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
close($RCSFILE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$dip = `echo "$curstamp" >$cstamp`;
|
|
||||||
|
|
||||||
unlink("$TREE/:TreeListing.changes");
|
|
||||||
rename("$TREE/:TreeListing.changes.new","$TREE/:TreeListing.changes");
|
|
|
@ -1,54 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
|
|
||||||
TMPFILE=/tmp/xxIIee$$
|
|
||||||
TMPFILE300=${TMPFILE}300
|
|
||||||
TMPFILE700=${TMPFILE}700
|
|
||||||
TMPFILEOTHER=${TMPFILE}OTHER
|
|
||||||
TMPFILEEMPTY=${TMPFILE}EMPTY
|
|
||||||
|
|
||||||
if (( $# < 1 ))
|
|
||||||
then
|
|
||||||
PWDIR=`/bin/pwd`
|
|
||||||
DATEDIR=`basename $PWDIR`
|
|
||||||
DIR=/x/logs/build/$DATEDIR
|
|
||||||
else
|
|
||||||
DIR=/x/logs/build/$1
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
echo >$TMPFILEEMPTY
|
|
||||||
echo >>$TMPFILEEMPTY
|
|
||||||
echo >>$TMPFILEEMPTY
|
|
||||||
|
|
||||||
echo "300 Build Machines in $DIR" > $TMPFILE300
|
|
||||||
echo >> $TMPFILE300
|
|
||||||
|
|
||||||
echo "700 Build Machines in $DIR" > $TMPFILE700
|
|
||||||
echo >> $TMPFILE700
|
|
||||||
|
|
||||||
echo "Other Build Machines in $DIR" > $TMPFILEOTHER
|
|
||||||
echo >> $TMPFILEOTHER
|
|
||||||
|
|
||||||
|
|
||||||
find $DIR -name summar\* -exec grep master_build {} \; > $TMPFILE
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
grep 300 $TMPFILE | sort -k 6,6 >> $TMPFILE300
|
|
||||||
|
|
||||||
grep 700 $TMPFILE | sort -k 6,6 >> $TMPFILE700
|
|
||||||
|
|
||||||
grep -v 300 $TMPFILE | grep -v 700 | sort -k 6,6 >> $TMPFILEOTHER
|
|
||||||
|
|
||||||
cat $TMPFILE700 $TMPFILEEMPTY $TMPFILEOTHER $TMPFILEEMPTY $TMPFILE300
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
rm $TMPFILE
|
|
||||||
rm $TMPFILE300
|
|
||||||
rm $TMPFILE700
|
|
||||||
rm $TMPFILEOTHER
|
|
||||||
rm $TMPFILEEMPTY
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,121 +0,0 @@
|
||||||
#! /usr/local/bin/perl
|
|
||||||
|
|
||||||
eval "exec /usr/local/bin/perl -S $0 $*"
|
|
||||||
if $running_under_some_shell;
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
#
|
|
||||||
# File: cleanLinks <source tree>
|
|
||||||
# RCS: $XConsortium: cleanLinks /main/3 1995/10/30 13:43:35 rswiston $
|
|
||||||
# Author: Marc Ayotte Hewlett-Packard, OSSD-CV
|
|
||||||
# Created: Sun Jul 4 17:57:13 PDT 1993
|
|
||||||
# Language: perl
|
|
||||||
# Package: N/A
|
|
||||||
# Status: CDE distributed
|
|
||||||
#
|
|
||||||
# (c) Copyright 1993, Hewlett-Packard Company, all rights reserved.
|
|
||||||
#
|
|
||||||
# Usage: cleanLinks <directory>
|
|
||||||
#
|
|
||||||
# Description: This script removes symbolic links to nowhere in
|
|
||||||
# <directory>. It does not remove anything with RCS
|
|
||||||
# in its path.
|
|
||||||
#
|
|
||||||
################################################################################
|
|
||||||
if ($ARGV[0]) {
|
|
||||||
$TREE = $ARGV[0];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
die " USAGE CleanLinks <source directory>\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (! chdir("$TREE")) {
|
|
||||||
die " ERROR -> Couldn't change directory to $TREE.\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
#######################################################
|
|
||||||
# define local subroutines
|
|
||||||
#######################################################
|
|
||||||
sub dokill {
|
|
||||||
die "\n left on INTR \n";
|
|
||||||
exit 1;
|
|
||||||
}
|
|
||||||
########################################################
|
|
||||||
# Catch signals
|
|
||||||
########################################################
|
|
||||||
$SIG{'INT'} = 'dokill';
|
|
||||||
|
|
||||||
|
|
||||||
##############################
|
|
||||||
# get the symlinks in the tree
|
|
||||||
##############################
|
|
||||||
if (! open(FIND,"find . -type d ! -type l -print|")) {
|
|
||||||
print STDERR " ERROR failure in open used for find.\n";
|
|
||||||
die "You may have to contact your build administrator\n";
|
|
||||||
}
|
|
||||||
#
|
|
||||||
# don't buffer find output
|
|
||||||
#
|
|
||||||
$| = 1;
|
|
||||||
|
|
||||||
print "************ List of symlinks to nowhere removed **********\n";
|
|
||||||
|
|
||||||
|
|
||||||
##################################################################
|
|
||||||
# go through the directories and examine each symlink.
|
|
||||||
# resolve the symlink and, if the file at the end doesn't exist,
|
|
||||||
# remove the original symlink. Don't do anything that ends in RCS.
|
|
||||||
##################################################################
|
|
||||||
FILE:
|
|
||||||
while ($new = <FIND>) {
|
|
||||||
chop $new;
|
|
||||||
if (! opendir(THISDIR,"$new")) {
|
|
||||||
print STDERR " WARNING -> could not process directory $new\n";
|
|
||||||
next FILE;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (! chdir("$new")) {
|
|
||||||
print STDERR " WARNING -> could not change directory to $new\n";
|
|
||||||
next FILE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
# remove . from $new path for cuteness of output
|
|
||||||
$new =~ s%^\.%%;
|
|
||||||
|
|
||||||
@allfiles = grep(!/^\.\.?$/, readdir(THISDIR));
|
|
||||||
foreach $file (@allfiles) {
|
|
||||||
if (( -l $file) && ($file !~ m%RCS$%) && (! -d $file)) {
|
|
||||||
#
|
|
||||||
# resolve the link
|
|
||||||
#
|
|
||||||
$tmp1file = $file;
|
|
||||||
$counter = 0;
|
|
||||||
while (defined($tmp2file = readlink($tmp1file))) {
|
|
||||||
$tmp1file = $tmp2file;
|
|
||||||
#
|
|
||||||
# watch for cyclic symlinks
|
|
||||||
#
|
|
||||||
if ($counter++ == 10) {
|
|
||||||
last;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#
|
|
||||||
# if last piece in resolved chain is not a file
|
|
||||||
# it is a symlink to nowhere -> remove
|
|
||||||
#
|
|
||||||
if ( ! -e $tmp1file) { # remove link to nowhere
|
|
||||||
if (unlink("$file")) {
|
|
||||||
print "removing ${TREE}${new}/${file}\n";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
print STDERR " WARNING -> ${TREE}${new}/${file} -> could not remove\n";
|
|
||||||
print "$!\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
closedir(THISDIR);
|
|
||||||
if (! chdir("$TREE")) {
|
|
||||||
die " ERROR -> Couldn't change directory to $TREE.\n";
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,28 +0,0 @@
|
||||||
#! /bin/ksh
|
|
||||||
|
|
||||||
# This script trims the number of files in the main build log directory
|
|
||||||
# It can also be used to trim other log files
|
|
||||||
# marca 2/7/90
|
|
||||||
USAGE="cleanLogs [logdir] [number of logs left]"
|
|
||||||
|
|
||||||
# defaults
|
|
||||||
LOGSLEFT=14
|
|
||||||
LOGDIR=/x/logs/build
|
|
||||||
[ $# -gt 1 ] && LOGSLEFT=$2
|
|
||||||
[ $# -gt 0 ] && LOGDIR=$1
|
|
||||||
|
|
||||||
#clean up the log files because dere be too many
|
|
||||||
echo ""
|
|
||||||
echo "***************************************"
|
|
||||||
echo "START Trimming log files"
|
|
||||||
cd $LOGDIR
|
|
||||||
LOGS=`ls -rt`
|
|
||||||
set -- $LOGS
|
|
||||||
|
|
||||||
while [ $# -gt $LOGSLEFT ]
|
|
||||||
do
|
|
||||||
#eliminate last log file
|
|
||||||
echo "Trying to delete $1"
|
|
||||||
rm -rf $1 || echo "could not delete $1"
|
|
||||||
shift
|
|
||||||
done
|
|
|
@ -1,23 +0,0 @@
|
||||||
#! /bin/sh
|
|
||||||
# This script cleans the fnrclone, etc directories.
|
|
||||||
|
|
||||||
for DIRS in `echo "fnrclone fnrnolink fnrnoRCS"`
|
|
||||||
do
|
|
||||||
CURRENT=$HOME/$DIRS
|
|
||||||
if [ -d $CURRENT ];then
|
|
||||||
echo ""
|
|
||||||
echo "In $CURRENT"
|
|
||||||
cd $CURRENT
|
|
||||||
LOGS=`ls -rt`
|
|
||||||
set -- $LOGS
|
|
||||||
|
|
||||||
#check to see if you have at least 10 log and script files
|
|
||||||
while [ $# -gt 20 ]
|
|
||||||
do
|
|
||||||
echo $1
|
|
||||||
rm -rf $1 || echo "could not delete $1"
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
echo ""
|
|
||||||
done
|
|
|
@ -1,29 +0,0 @@
|
||||||
#! /bin/sh
|
|
||||||
|
|
||||||
# This script cleans a source tree of unwanted ,RCSnew* files
|
|
||||||
# created when you abort RCS.
|
|
||||||
# It also makes all the ,v files have group bin and owner bin --marca
|
|
||||||
# marca 2/7/90
|
|
||||||
|
|
||||||
USAGE="USAGE: cleansrctree <sourcedir>"
|
|
||||||
|
|
||||||
if [ $# -lt 1 ];then
|
|
||||||
echo ""
|
|
||||||
echo "$USAGE"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd /$1
|
|
||||||
|
|
||||||
#change owner and group to bin
|
|
||||||
echo "FILES NOT OWNER BIN"
|
|
||||||
find . -name "*,v" ! -user bin -print -exec chown bin {} \;
|
|
||||||
find . -name "*,v" ! -group bin -print -exec chgrp bin {} \;
|
|
||||||
echo "FILES not 444"
|
|
||||||
find . -name "*,v" -perm 0440 -exec chmod +r {} \; -print
|
|
||||||
echo ""
|
|
||||||
echo "FILES NOT GROUP BIN"
|
|
||||||
echo ""
|
|
||||||
echo ",RCS FILES"
|
|
||||||
# eliminate , files
|
|
||||||
find . -name ",*" -print -exec rm -f {} \;
|
|
|
@ -1,69 +0,0 @@
|
||||||
################################################################################
|
|
||||||
#
|
|
||||||
# RCS: $XConsortium: cron_example /main/3 1995/10/30 13:43:46 rswiston $
|
|
||||||
# Author: Marc Ayotte, Hewlett-Packard OSSD-CV
|
|
||||||
# Created: Tue Jun 29 10:12:15 PDT 1993
|
|
||||||
# Language: N/A
|
|
||||||
# Package: N/A
|
|
||||||
# Status: CDE
|
|
||||||
#
|
|
||||||
# (c) Copyright 1993, Hewlett-Packard Company, all rights reserved.
|
|
||||||
#
|
|
||||||
# Description: This file is an example cron script which triggers
|
|
||||||
# builds and does normal tree maintenance. The various functions
|
|
||||||
# are delimited by the letters #[A-Z]).
|
|
||||||
# A) fnrclone can leave 2 files each time it executes:
|
|
||||||
# The file ${HOME}/fnrclone/log.hhmmss and script.hhmmss.
|
|
||||||
# These files can pile up and they are cleaned out by the cleanfnr
|
|
||||||
# script.
|
|
||||||
# NOTE: In the very near future this will not be the default
|
|
||||||
# operation for fnrclone and this may no longer be necessary.
|
|
||||||
# B) By default, master_build puts its log files in the
|
|
||||||
# /x/logs/build/MMDD/${buildtreename} directory. The
|
|
||||||
# cleanLogs script trims these directories.
|
|
||||||
# C) The script ListTheTree creates a listing of all of the files in
|
|
||||||
# a tree and puts the list under the name :TreeListing in the top
|
|
||||||
# of the tree.
|
|
||||||
# D) An example of building the /x/cde_hp700_90 tree on the
|
|
||||||
# machine that is doing cron.
|
|
||||||
# E) An example of building the /x/cde_hp700d_90(debug) tree on a
|
|
||||||
# remote machine using remsh.
|
|
||||||
################################################################################
|
|
||||||
#A) clean ${HOME}/fnrclone directory
|
|
||||||
4 11 * * * /x/cdesrc/admin/BuildTools/master_build/cleanfnr 1>/users/marca/xbuild/cleanfnr.log 2>&1
|
|
||||||
|
|
||||||
#B) clean excess build logs in /x/logs/build
|
|
||||||
4 19 * * * /x/cdesrc/admin/BuildTools/master_build/cleanLogs 1>/x/logs/cronlogs/cleanLogs.log 2>&1
|
|
||||||
|
|
||||||
#C) create a listing of the files in a tree and put into top of the tree.
|
|
||||||
# this also creates a listing of locked files
|
|
||||||
10 12 * * * /x/cdesrc/admin/BuildTools/master_build/ListTheTree /x/cdesrc 1>/x/logs/cronlogs/ListTheTreecdesrc.log 2>&1
|
|
||||||
|
|
||||||
#D) build the hp tree putting the log files in the default location.
|
|
||||||
# the source tree is /x/cdesrc; the build tree is /x/cde_hp700_90.
|
|
||||||
# This entry will first do an fnrclone -s /x/cdesrc /x/cde_hp700_90
|
|
||||||
# to sync up the build tree's links to the source (-clone s).
|
|
||||||
# The log and error files from the clone will go into
|
|
||||||
# /x/logs/build/mmdd/cde_hp700_90/clonelog.HHMMSS
|
|
||||||
# /x/logs/build/mmdd/cde_hp700_90/cloneerr.HHMMSS
|
|
||||||
# It uses -c to do all of the normal imake functions:
|
|
||||||
# make -i Makefile; make -i Makefiles;make -i includes;make -i
|
|
||||||
# depend and make -i.
|
|
||||||
# The log files for make -i will go in
|
|
||||||
# /x/logs/build/mmdd/cde_hp700_90/make.HHMMSS.
|
|
||||||
# The log files for all other operations will go in
|
|
||||||
# /x/logs/build/mmdd/cde_hp700_90/allmake.HHMMSS.
|
|
||||||
# The second entry uses -w to "clean the tree": remove all .o's, .a's,
|
|
||||||
# executables etc. Normally we make clean once a week on Saturday night.
|
|
||||||
# The -cl option will remove symbolic links to nowhere.
|
|
||||||
# The -m option will mail notification to someone when the build
|
|
||||||
# is complete.
|
|
||||||
############ cde_hp700_90 - LOCAL ##############
|
|
||||||
6 22 * * 0,1,2,3,4,5 /x/cdesrc/admin/BuildTools/master_build/master_build -src /x/cdesrc -build /x/cde_hp700_90 -clone s -cl -c -m buildwatch@hpcvlx 1>/x/logs/cronlogs/r5s700.log 2>&1
|
|
||||||
6 22 * * 6 /x/cdesrc/admin/BuildTools/master_build/master_build -src /x/cdesrc -build /x/cde_hp700_90 -clone s -cl -c -w -m buildwatch@hpcvlx 1>/x/logs/cronlogs/r5s700.log 2>&1
|
|
||||||
|
|
||||||
|
|
||||||
#E) build the debug tree on hpcvusj
|
|
||||||
############ cde_hp700d_90 - HPCVUSJ ##############
|
|
||||||
10 22 * * 0,1,2,3,4,5 /x/cdesrc/admin/BuildTools/master_build/remote_build hpcvusj -src /x/cdesrc -build /x/cde_hp700d_90 -clone s -cl -c -m buildwatch@hpcvlx 1>/x/logs/cronlogs/r5s700.log 2>&1
|
|
||||||
10 22 * * 6 /x/cdesrc/admin/BuildTools/master_build/remote_build hpcvusj -src /x/cdesrc -build /x/cde_hp700d_90 -clone s -cl -c -w -m buildwatch@hpcvlx 1>/x/logs/cronlogs/r5s700.log 2>&1
|
|
|
@ -1,50 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
#
|
|
||||||
# this script make sure that all dirs in /x80src are
|
|
||||||
# owned by xbuild, and that all directories have permissions
|
|
||||||
# of 755.
|
|
||||||
#
|
|
||||||
# - jim andreas 10/91
|
|
||||||
#
|
|
||||||
# modified to be more general by Marc Ayotte 11/92
|
|
||||||
|
|
||||||
doUsage()
|
|
||||||
{
|
|
||||||
cat << eof
|
|
||||||
|
|
||||||
USAGE: fixSourceDirPerm <tree> <owner> <group>
|
|
||||||
|
|
||||||
Note: if owner != bin, files and directories owned by bin
|
|
||||||
will NOT be changed to owner.
|
|
||||||
|
|
||||||
eof
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ $# -lt 3 ];then
|
|
||||||
doUsage;
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd $1 || doUsage
|
|
||||||
|
|
||||||
# Some dirs in the build trees have to be owned by bin (rcs_tools)
|
|
||||||
# if bin is not the chosen group, don't change files that are already bin
|
|
||||||
if [ "$2" != "bin" ];then
|
|
||||||
DontDoBin="! -user bin"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# change ownership of non-conforming dirs
|
|
||||||
#
|
|
||||||
echo "DIRS not owned by $2"
|
|
||||||
find . -type d ! -path "*RCS*" ! -path "*/CRT*" ! -user $2 $DontDoBin -print -exec chown $2 {} \; -exec chgrp $3 {} \;
|
|
||||||
|
|
||||||
# chmod mode of non-conforming dirs
|
|
||||||
#
|
|
||||||
echo "DIRS not 755 permission by $2"
|
|
||||||
find . -type d -user $2 ! -path "*/CRT*" $DontDoBin ! -perm 755 -print -exec chmod 755 {} \;
|
|
||||||
|
|
||||||
# chown mode of non-conforming files
|
|
||||||
#
|
|
||||||
echo "FILES not owned by $2"
|
|
||||||
find . -type f ! -path "*RCS*" ! -path "*/CRT*" ! -user $2 $DontDoBin -print -exec chown $2 {} \; -exec chgrp $3 {} \;
|
|
|
@ -1,89 +0,0 @@
|
||||||
#! /usr/local/bin/perl
|
|
||||||
|
|
||||||
eval "exec /usr/local/bin/perl -S $0 $*"
|
|
||||||
if $running_under_some_shell;
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
#
|
|
||||||
# File: manageBInstallDirs <source tree>
|
|
||||||
# RCS: $XConsortium: manageBInstallDirs /main/3 1995/10/30 13:43:53 rswiston $
|
|
||||||
# Author: Marc Ayotte Hewlett-Packard, OSSD-CV
|
|
||||||
# Created: Thu Dec 30 14:02:31 PST 1993
|
|
||||||
# Language: perl
|
|
||||||
# Package: N/A
|
|
||||||
# Status: CDE distributed
|
|
||||||
#
|
|
||||||
# (c) Copyright 1993, Hewlett-Packard Company, all rights reserved.
|
|
||||||
#
|
|
||||||
# Usage: manageBInstallDirs <directory> <latestsubdir> [#dirsleft]
|
|
||||||
#
|
|
||||||
# Description: This script removes excessive binstall directories of
|
|
||||||
# the type parentdir/mm_dd (month day).
|
|
||||||
# It also symbolically links the most recent subdirectory
|
|
||||||
# to parentdir/latest.
|
|
||||||
#
|
|
||||||
################################################################################
|
|
||||||
if ($ARGV[1]) {
|
|
||||||
$tree = $ARGV[0];
|
|
||||||
$latestSubdir = $ARGV[1];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
die "USAGE manageBInstallDirs <parent directory> <latestsubdir> [# dirsleft]\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (! chdir("$tree")) {
|
|
||||||
die " ERROR -> Couldn't change directory to $tree.\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($ARGV[2]) {
|
|
||||||
$numDirsLeft = $ARGV[2];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$numDirsLeft = 7;
|
|
||||||
}
|
|
||||||
|
|
||||||
#######################################################
|
|
||||||
# define local subroutines
|
|
||||||
#######################################################
|
|
||||||
sub dokill {
|
|
||||||
die "\n left on INTR \n";
|
|
||||||
exit 1;
|
|
||||||
}
|
|
||||||
########################################################
|
|
||||||
# Catch signals
|
|
||||||
########################################################
|
|
||||||
$SIG{'INT'} = 'dokill';
|
|
||||||
|
|
||||||
|
|
||||||
##################################################
|
|
||||||
# get the mm_dd directories in oldest first order.
|
|
||||||
# remove the oldest if there are more than minimum.
|
|
||||||
##################################################
|
|
||||||
@allDirs = (`ls -t`);
|
|
||||||
$counter = 0;
|
|
||||||
foreach $dir (@allDirs){
|
|
||||||
chop $dir;
|
|
||||||
$_ = $dir;
|
|
||||||
if (m%^[0-9][0-9]_[0-9][0-9]$% && -d $dir) {
|
|
||||||
if ($counter++ >= $numDirsLeft) {
|
|
||||||
print "removing $tree/$dir\n";
|
|
||||||
system "rm -rf $dir";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
############################
|
|
||||||
# link latestSubdir to latest
|
|
||||||
############################
|
|
||||||
if (-l "latest") {
|
|
||||||
print "linking $latestSubdir to \"latest\"\n";
|
|
||||||
system "rm -f latest";
|
|
||||||
system "ln -s -f $latestSubdir latest";
|
|
||||||
}
|
|
||||||
elsif(-d "latest") {
|
|
||||||
print "Error - directory \"latest\" is a real directory";
|
|
||||||
}
|
|
||||||
else { # create link
|
|
||||||
system "ln -s -f $latestSubdir latest";
|
|
||||||
}
|
|
|
@ -1,520 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
################################################################################
|
|
||||||
#
|
|
||||||
# File: master_build
|
|
||||||
# RCS: $XConsortium: master_build /main/14 1996/07/18 14:17:16 drk $
|
|
||||||
# Author: Marc Ayotte Hewlett-Packard, OSSD-CV
|
|
||||||
# Created: 2/6/90
|
|
||||||
# Modified by: Jim Andreas, Fred Handloser, Marc Ayotte, Ron Voll
|
|
||||||
# and others from Hewlett-Packard, OSSD-CV
|
|
||||||
# Language: N/A
|
|
||||||
# Package: N/A
|
|
||||||
# Status: CDE distributed
|
|
||||||
#
|
|
||||||
# (c) Copyright 1993, Hewlett-Packard Company, all rights reserved.
|
|
||||||
#
|
|
||||||
# Description: This file controls the building and cloning of
|
|
||||||
# of source and build trees. Look at the file cron.example
|
|
||||||
# and the usage information below for examples of how
|
|
||||||
# to use this script. There is also a man page
|
|
||||||
# master_build.1
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
function DoUsage #
|
|
||||||
################################################################################
|
|
||||||
{
|
|
||||||
if [ -n $1 ]; then
|
|
||||||
echo "unrecognized option: $1"
|
|
||||||
echo
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat<<eof
|
|
||||||
Usage:master_build
|
|
||||||
[ -src <srcdir> ] (source directory e.g. /proj/cde, /proj/x11)
|
|
||||||
[ -build <buildir> (build dir. as in /proj/cde, /proj/x11)
|
|
||||||
[ -clone <option> ] (one of:
|
|
||||||
f -> do a full checkout # TEMPORARILY OBSOLETE!!
|
|
||||||
n -> clone creating real files (fnrclone -n)
|
|
||||||
s -> clone without checking files out of RCS
|
|
||||||
c -> clone checking out newer RCS files
|
|
||||||
sync-> clone checking out newer RCS files (OBSOLETE)
|
|
||||||
[ -cl ] (run cleanLinks)
|
|
||||||
[ -c ] (compile)
|
|
||||||
[ -b ] (run make binstall and use the default path mechanism in imake)
|
|
||||||
[ -bp <path> ] (run make binstall and supply the install location)
|
|
||||||
[ -ba <path> ] (run make binstall and create an automatic install path)
|
|
||||||
(This path is of the form path/mm_dd).
|
|
||||||
[ -cb <#dirs left> ] (clean binstall directories. must be used
|
|
||||||
with -ba option)
|
|
||||||
[ -l ] (make lint libraries)
|
|
||||||
[ -n ] (do not make Makefile,Makefiles,includes,depend)
|
|
||||||
[ -w ] (clean the tree before building)
|
|
||||||
[ -be <chrootdir> ] (do a chroot build using chrootdir)
|
|
||||||
[ -ld <ldoptions> ] (pass ld options to build probably obsolete)
|
|
||||||
[ -model <model> ] (necessary for apollo or prism)
|
|
||||||
[ -m ] ( send mail to all in BUILD_WATCH list when finished)
|
|
||||||
[ -noIgnore ] (do not use the -k option to make)
|
|
||||||
[ -log <logdir> ] directs output to <logdir>/mm_dd/cde
|
|
||||||
e.g. -log /proj/cde/logs -> /proj/cde/logs/mm_dd/cde/*
|
|
||||||
if no -log is specified, output is directed to <buildir>/mm_dd/cde/*
|
|
||||||
if no -build is specified, output is directed to ./mm_dd/cde/*
|
|
||||||
[ -t ] <tooldir> (directory containing master_build, fnrclone
|
|
||||||
directories. Currently $TOOLDIR)
|
|
||||||
eof
|
|
||||||
|
|
||||||
#
|
|
||||||
# if there is a bad option mail to any in the BUILD_WATCH list,
|
|
||||||
# we don't know if the -m option was used.
|
|
||||||
if [ "$BUILD_WATCH" ]
|
|
||||||
then
|
|
||||||
LETTER=/tmp/optError.$$
|
|
||||||
echo "master_build did not run on machine $SYSNAME" > $LETTER
|
|
||||||
echo "due to bad option '$1'" >> $LETTER
|
|
||||||
echo "" >> $LETTER
|
|
||||||
echo "" >> $LETTER
|
|
||||||
printenv >> $LETTER
|
|
||||||
mailx -s"master_build did not run on $SYSNAME due to bad option '$1'" $BUILD_WATCH < $LETTER
|
|
||||||
rm $LETTER
|
|
||||||
fi
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
} # END DoUsage
|
|
||||||
|
|
||||||
|
|
||||||
###########################################################################
|
|
||||||
# Initialize Parameters
|
|
||||||
# get the architecture and start time
|
|
||||||
SYSNAME=`uname -n`
|
|
||||||
ARCH=`uname -s`
|
|
||||||
|
|
||||||
#
|
|
||||||
# Resolve date call that depend on HP-UX, Apollo sys5.3, or Apollo
|
|
||||||
# bsd4.3. The default for architectures is "date
|
|
||||||
#
|
|
||||||
if [ -f /hp-ux ]
|
|
||||||
then
|
|
||||||
DATECMD="/bin/date"
|
|
||||||
elif [ -f /com/ctnode ]
|
|
||||||
then
|
|
||||||
DATECMD="/sys5.3/bin/date"
|
|
||||||
else
|
|
||||||
DATECMD="date"
|
|
||||||
fi
|
|
||||||
|
|
||||||
START_TIME_LONG=`$DATECMD`
|
|
||||||
|
|
||||||
START_TIME="`$DATECMD +%d`_`$DATECMD +%H`:`$DATECMD +%M`:`$DATECMD +%S`"
|
|
||||||
DATE="`$DATECMD +%m`_`$DATECMD +%d`"
|
|
||||||
|
|
||||||
SENDMAIL="FALSE"
|
|
||||||
TOOLDIR=/x/cdesrc/admin/BuildTools
|
|
||||||
IGNORE="-k"
|
|
||||||
BASE_LOG_DIR=
|
|
||||||
###########################################################################
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
###########################################################################
|
|
||||||
# parse command line arguments...
|
|
||||||
|
|
||||||
# Prepend options from the MASTERBUILD environment variable.
|
|
||||||
set -- $MASTERBUILD $*
|
|
||||||
|
|
||||||
if [ $# -lt 1 ]
|
|
||||||
then
|
|
||||||
DoUsage $1 # exit on error
|
|
||||||
fi
|
|
||||||
|
|
||||||
while [ $# -gt 0 ]
|
|
||||||
do case $1 in
|
|
||||||
-src) SRC_DIR=$2;shift 2 ;; # source directory
|
|
||||||
-build) OBJ_DIR=$2;shift 2 ;; # build directory
|
|
||||||
-clone) CLONEOPT=$2;shift 2 ;; # clone options if any
|
|
||||||
-cl) CLEANLINKS="TRUE";shift ;; # run clean links
|
|
||||||
-c) COMPILE="TRUE";shift ;; # Compile object
|
|
||||||
-b) DOBINSTALL="TRUE";
|
|
||||||
BINSTALL_PATH=;shift ;; # run make binstall w/default path
|
|
||||||
-bp) DOBINSTALL="TRUE";
|
|
||||||
BINSTALL_PATH=$2;
|
|
||||||
shift 2 ;; # run make binstall w/supplied path
|
|
||||||
-ba) DOBINSTALL="TRUE";
|
|
||||||
BINSTALL_PATH=$2;
|
|
||||||
BINSTALL_AUTOPATH="TRUE"; # append /mm_dd to BINSTALL_PATH
|
|
||||||
shift 2 ;; # run make binstall w/auto path
|
|
||||||
-cb) DOCLEANBINSTALL="TRUE" ; # run manageBInstallDirs
|
|
||||||
NUMBINSTALLDIRSLEFT=$2 ; # directories to leave when
|
|
||||||
shift 2 ;; # cleaning binstall subdirs
|
|
||||||
-n) NOMAKEMAKEFILE=TRUE;shift;; # Do not do make Makefile, etc
|
|
||||||
-w) CLEAN="TRUE";shift ;; # Remove all object files
|
|
||||||
-l) DOLINT="TRUE";shift ;; # Make lint from top level
|
|
||||||
-ld) LDOPTIONS=$2;shift 2 ;; # LDOPTS passed
|
|
||||||
-be) BE=TRUE;BEDIR=$2;shift 2;; # use pseudo-root BEDIR to build
|
|
||||||
-log) BASE_LOG_DIR=$2;shift 2;; # use alternate log directory
|
|
||||||
-t) TOOLDIR=$2;shift 2 ;; # directory for fnrclone, etc.
|
|
||||||
-model) MODEL=$2;shift 2 ;; # not necessary for hp
|
|
||||||
-noIgnore) IGNORE=; shift ;; # do not ignore make errors (no -k)
|
|
||||||
-m) SENDMAIL="TRUE";BUILD_WATCH=$2;shift 2 ;; # send mail when finished
|
|
||||||
*) DoUsage $1;shift ;; # exit on error
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
umask 002
|
|
||||||
|
|
||||||
|
|
||||||
###########################################################################
|
|
||||||
# Set up various log directories
|
|
||||||
#
|
|
||||||
CLEANBINSTALL=$TOOLDIR/master_build/manageBInstallDirs
|
|
||||||
LATESTDIR=$DATE # for manageBInstallDirs
|
|
||||||
CLEANBINSTALLPATH=$BINSTALL_PATH # for manageBInstallDirs
|
|
||||||
|
|
||||||
# binstall automatic path
|
|
||||||
if [ "$BINSTALL_AUTOPATH" ];then
|
|
||||||
BINSTALL_PATH=$BINSTALL_PATH/$DATE
|
|
||||||
else
|
|
||||||
if [ "$DOCLEANBINSTALL" ];then
|
|
||||||
echo "ERROR - can't run manageBInstallDirs unless -ba option is used";
|
|
||||||
DoUsage
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# The log directory is determined as follows
|
|
||||||
#
|
|
||||||
# 1. The directory specified in the -log flag.
|
|
||||||
# 2. The directory specified in the -build flag.
|
|
||||||
# 3. The current directory.
|
|
||||||
#
|
|
||||||
|
|
||||||
if [ "$BASE_LOG_DIR" = "" ]; then
|
|
||||||
if [ "$OBJ_DIR" ]; then
|
|
||||||
BASE_LOG_DIR=$OBJ_DIR;
|
|
||||||
else
|
|
||||||
BASE_LOG_DIR=".";
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
BASE_LOG_DIR=$BASE_LOG_DIR/$DATE
|
|
||||||
|
|
||||||
# set up log directories on build machines
|
|
||||||
# use build directory for log file if present, otherwise use source
|
|
||||||
# if binstall wanted and no object dir -> error
|
|
||||||
if [ "$OBJ_DIR" ];then
|
|
||||||
FOCUS_DIR=$OBJ_DIR
|
|
||||||
else
|
|
||||||
if [ "$DOBINSTALL" ];then
|
|
||||||
echo "\n\t----------------------------------------------------------";
|
|
||||||
echo "\t*** ERROR - must specify -build option with -b options ***"
|
|
||||||
echo "\t----------------------------------------------------------";
|
|
||||||
DoUsage;
|
|
||||||
fi
|
|
||||||
FOCUS_DIR=$SRC_DIR
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# check the existence of OSVersion.tmpl
|
|
||||||
#
|
|
||||||
|
|
||||||
if [ ! -a $FOCUS_DIR/config/OSVersion.tmpl ]; then
|
|
||||||
echo "$FOCUS_DIR/config/OSVersion.tmpl does not exist"
|
|
||||||
echo "Abort...."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# check the existence of localtree.tmpl
|
|
||||||
#
|
|
||||||
|
|
||||||
if [ ! -a $FOCUS_DIR/config/localtree.tmpl ]; then
|
|
||||||
echo "$FOCUS_DIR/config/localtree.tmpl does not exist"
|
|
||||||
echo "Abort...."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# setup the log directory
|
|
||||||
#
|
|
||||||
|
|
||||||
LEAF_LOG_DIR=`basename $FOCUS_DIR`
|
|
||||||
LOG_DIR=$BASE_LOG_DIR/$LEAF_LOG_DIR
|
|
||||||
[ ! -d $LOG_DIR ] && mkdir -p $LOG_DIR
|
|
||||||
|
|
||||||
DATE=`$DATECMD +%H%M%S`
|
|
||||||
BUILDLOGDATE=`$DATECMD +%a`
|
|
||||||
|
|
||||||
# make a daily directory for logs
|
|
||||||
CLONE_ERR=$LOG_DIR/cloneerr.$DATE
|
|
||||||
CLONE_LOG=$LOG_DIR/clonelog.$DATE
|
|
||||||
CLEANLINKS_LOG=$LOG_DIR/cleanlinks.$DATE
|
|
||||||
MAKE_FILE=$LOG_DIR/make.$DATE
|
|
||||||
ALL_MAKE=$LOG_DIR/allmake.$DATE
|
|
||||||
LINT_LOG=$LOG_DIR/lint.$DATE
|
|
||||||
BINSTALL_LOG=$LOG_DIR/binstall.$DATE
|
|
||||||
CLEANBINSTALL_LOG=$LOG_DIR/cleanbinstall.$DATE
|
|
||||||
SUMMARY_FILE=$LOG_DIR/summary.$DATE
|
|
||||||
PROCESSID_FILE=$LOG_DIR/pid.$DATE
|
|
||||||
|
|
||||||
echo "$$" > $PROCESSID_FILE
|
|
||||||
echo "pid of master_build is $$ for $FOCUS_DIR on $SYSNAME" >> $PROCESSID_FILE
|
|
||||||
|
|
||||||
# Log file for a particular build tree
|
|
||||||
[ "$OBJ_DIR" ] && [ ! -d $OBJ_DIR/logs ] && mkdir $OBJ_DIR/logs
|
|
||||||
OBJ_DIR_LOG=$OBJ_DIR/logs/make.${BUILDLOGDATE}.${DATE}
|
|
||||||
|
|
||||||
|
|
||||||
###########################################################################
|
|
||||||
# Clone source or build trees
|
|
||||||
#
|
|
||||||
# clone if appropriate
|
|
||||||
if [ "$CLONEOPT" ]
|
|
||||||
then
|
|
||||||
cd $FOCUS_DIR #directory which will be cloned if not checkout all
|
|
||||||
echo "\n==== Cloning $FOCUS_DIR on $SYSNAME, pid of master_build is $$ ====\n";
|
|
||||||
|
|
||||||
case $CLONEOPT in
|
|
||||||
s) $TOOLDIR/fnrclone/fnrclone $SRC_DIR $FOCUS_DIR -f $CLONE_LOG 1>$CLONE_ERR 2>&1;;
|
|
||||||
n | c) $TOOLDIR/fnrclone/fnrclone $SRC_DIR $FOCUS_DIR -${CLONEOPT} -f $CLONE_LOG 1>$CLONE_ERR 2>&1;;
|
|
||||||
sync) $TOOLDIR/fnrclone/fnrclone $SRC_DIR $FOCUS_DIR -c -f $CLONE_LOG 1>$CLONE_ERR 2>&1;;
|
|
||||||
*) echo "\n=========== bad clone option $CLONEOPT on $SYSNAME ========\n";
|
|
||||||
# if there is a bad option mail to any in the BUILD_WATCH list,
|
|
||||||
# even if the -m option was not used since this is an error
|
|
||||||
if [ "$BUILD_WATCH" ]; then
|
|
||||||
LETTER=/tmp/cloneOptError.$$
|
|
||||||
echo "master_build on machine $SYSNAME exited " > $LETTER
|
|
||||||
echo "due to bad clone option '$CLONEOPT'" >> $LETTER
|
|
||||||
echo "" >> $LETTER
|
|
||||||
echo "" >> $LETTER
|
|
||||||
printenv >> $LETTER
|
|
||||||
mailx -s"master_build on $SYSNAME exited due to bad clone option '$CLONEOPT'" $BUILD_WATCH < $LETTER
|
|
||||||
rm $LETTER
|
|
||||||
fi
|
|
||||||
exit 1;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
#################################
|
|
||||||
# Clean symbolic links to nowhere
|
|
||||||
#################################
|
|
||||||
if [ "$CLEANLINKS" = "TRUE" ]
|
|
||||||
then
|
|
||||||
echo "\n= removing symbolic links to nowhere in $FOCUS_DIR on $SYSNAME =\n";
|
|
||||||
$TOOLDIR/master_build/cleanLinks $FOCUS_DIR 1>$CLEANLINKS_LOG 2>&1
|
|
||||||
fi
|
|
||||||
|
|
||||||
###########################################################################
|
|
||||||
#
|
|
||||||
# build new stuff...
|
|
||||||
#
|
|
||||||
|
|
||||||
if [ "$CLEAN" ]
|
|
||||||
then
|
|
||||||
CLEAN="make $IGNORE clean"
|
|
||||||
CLEAN_STEPNAME="clean "
|
|
||||||
else
|
|
||||||
CLEAN="true"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$COMPILE" -o "$DOLINT" ];then
|
|
||||||
if [ "$COMPILE" ]; then
|
|
||||||
BUILD="make $IGNORE"
|
|
||||||
COMPILE_STEPNAME="make"
|
|
||||||
else
|
|
||||||
BUILD="true"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$DOLINT" ];then
|
|
||||||
LINT="make $IGNORE lintlib"
|
|
||||||
LINT_STEPNAME="lintlib"
|
|
||||||
else
|
|
||||||
LINT="true"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# if only doing make (-n option) ignore everything else
|
|
||||||
if [ "$NOMAKEMAKEFILE" ];then
|
|
||||||
MFILE="true"
|
|
||||||
MFILES="true"
|
|
||||||
MKINCLUDES="true"
|
|
||||||
DEPEND="true"
|
|
||||||
else
|
|
||||||
MFILE="make -f Makefile.ini Makefile"
|
|
||||||
MFILES="make $IGNORE Makefiles"
|
|
||||||
MKINCLUDES="make $IGNORE includes"
|
|
||||||
DEPEND="make $IGNORE depend"
|
|
||||||
MAKEFILES_STEPNAME="Makefiles"
|
|
||||||
INCLUDES_STEPNAME="includes"
|
|
||||||
DEPEND_STEPNAME="depend"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "\n================= Building $OBJ_DIR on $SYSNAME ==================\n"
|
|
||||||
echo "Build Directory: $OBJ_DIR"
|
|
||||||
echo "Logging Directory: $LOG_DIR"
|
|
||||||
echo "MasterBuild Steps: $MAKEFILES_STEPNAME $CLEAN_STEPNAME $INCLUDES_STEPNAME $DEPEND_STEPNAME $COMPILE_STEPNAME $LINT_STEPNAME"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Print out information about the view configuration
|
|
||||||
#
|
|
||||||
|
|
||||||
CLEARTOOL=/usr/atria/bin/cleartool
|
|
||||||
if [ -f $CLEARTOOL -a -x $CLEARTOOL ]; then
|
|
||||||
CWD=`pwd`
|
|
||||||
cd $OBJ_DIR
|
|
||||||
echo "\nBuild view: " `$CLEARTOOL pwv -wdview -short`
|
|
||||||
echo "\nView config-spec:"
|
|
||||||
$CLEARTOOL catcs | grep -v "^#" | sed 's/.*/ &/'
|
|
||||||
echo "\nChecked out versions:"
|
|
||||||
$CLEARTOOL lsco -cview -avobs -fmt " %Sd %u %n\n"
|
|
||||||
cd $CWD
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# print out OSVersion.tmpl info if it is a symbolic link
|
|
||||||
#
|
|
||||||
|
|
||||||
echo "\n$FOCUS_DIR/config/OSVersion.tmpl:"
|
|
||||||
if [ -L $FOCUS_DIR/config/OSVersion.tmpl ]; then
|
|
||||||
ls -l $FOCUS_DIR/config/OSVersion.tmpl | \
|
|
||||||
awk '{ print " Link to -> " $11 }'
|
|
||||||
else
|
|
||||||
ls -l $FOCUS_DIR/config/OSVersion.tmpl
|
|
||||||
fi
|
|
||||||
awk '/^#define/ { print " " $2,$3 }' $FOCUS_DIR/config/OSVersion.tmpl
|
|
||||||
|
|
||||||
#
|
|
||||||
# print out localtree.tmpl info if it is a symbolic link
|
|
||||||
#
|
|
||||||
|
|
||||||
echo "\n$FOCUS_DIR/config/localtree.tmpl:"
|
|
||||||
if [ -L $FOCUS_DIR/config/localtree.tmpl ]; then
|
|
||||||
ls -l $FOCUS_DIR/config/localtree.tmpl | \
|
|
||||||
awk '{ print " Link to -> " $11 }'
|
|
||||||
else
|
|
||||||
ls -l $FOCUS_DIR/config/localtree.tmpl
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
######################################################################
|
|
||||||
# This section below probably only applies to Hewlett-Packard
|
|
||||||
# It concerns using a chroot build environment when building.
|
|
||||||
######################################################################
|
|
||||||
#chroot build
|
|
||||||
if [ "$BE" ];then
|
|
||||||
cat<<dernier>$BEDIR/tmp/allmake$$script
|
|
||||||
#! /bin/sh
|
|
||||||
umask 002
|
|
||||||
cd $OBJ_DIR && $MFILE && $MFILES && $CLEAN && $MKINCLUDES && $DEPEND
|
|
||||||
dernier
|
|
||||||
chmod +x $BEDIR/tmp/allmake$$script
|
|
||||||
/usr/local/bin/changeroot $BEDIR /tmp/allmake$$script 1>$ALL_MAKE 2>&1
|
|
||||||
rm -f $BEDIR/tmp/allmake$$script
|
|
||||||
|
|
||||||
cat<<dernier>$BEDIR/tmp/make$$script
|
|
||||||
#! /bin/sh
|
|
||||||
umask 002
|
|
||||||
LDOPTS="$LDOPTIONS"
|
|
||||||
export LDOPTS
|
|
||||||
cd $OBJ_DIR && $BUILD
|
|
||||||
dernier
|
|
||||||
chmod +x $BEDIR/tmp/make$$script
|
|
||||||
/usr/local/bin/changeroot $BEDIR /tmp/make$$script 2>&1 | tee $OBJ_DIR_LOG 1>$MAKE_FILE
|
|
||||||
rm -f $BEDIR/tmp/make$$script
|
|
||||||
|
|
||||||
if [ "$DOLINT" ];then
|
|
||||||
cat<<dernier>$BEDIR/tmp/lint$$script
|
|
||||||
#! /bin/sh
|
|
||||||
umask 002
|
|
||||||
cd $OBJ_DIR && $LINT
|
|
||||||
dernier
|
|
||||||
chmod +x $BEDIR/tmp/lint$$script
|
|
||||||
/usr/local/bin/changeroot $BEDIR /tmp/lint$$script 1>$LINT_LOG 2>&1
|
|
||||||
rm -f $BEDIR/tmp/lint$$script
|
|
||||||
fi
|
|
||||||
######################################################################
|
|
||||||
# non chroot (normal) builds
|
|
||||||
######################################################################
|
|
||||||
else
|
|
||||||
if [ "$ARCH" = "SunOS" ];then
|
|
||||||
PATH=$PATH:/usr/ccs/bin
|
|
||||||
export PATH
|
|
||||||
fi
|
|
||||||
if [ "$MODEL" = "apollo" -o "$MODEL" = "prism" ]
|
|
||||||
then
|
|
||||||
( umask 002
|
|
||||||
echo "Preparing to build in: \"$OBJ_DIR\"."
|
|
||||||
cd $OBJ_DIR &&
|
|
||||||
$MFILE &&
|
|
||||||
$MFILES &&
|
|
||||||
$CLEAN &&
|
|
||||||
$MKINCLUDES &&
|
|
||||||
$DEPEND
|
|
||||||
) 1>$ALL_MAKE 2>&1
|
|
||||||
|
|
||||||
( umask 002
|
|
||||||
echo "Building in \"$OBJ_DIR\"."
|
|
||||||
echo " X11REV=\"$X11REV\"."
|
|
||||||
echo " MOTIFREV=\"$MOTIFREV\"."
|
|
||||||
cd $OBJ_DIR &&
|
|
||||||
$BUILD
|
|
||||||
) 2>&1 | tee $OBJ_DIR_LOG 1>$MAKE_FILE
|
|
||||||
|
|
||||||
( umask 002
|
|
||||||
echo "Linting in \"$OBJ_DIR\"."
|
|
||||||
cd $OBJ_DIR &&
|
|
||||||
$LINT
|
|
||||||
) 1>$LINT_LOG 2>&1
|
|
||||||
else # all other architectures
|
|
||||||
COMMAND="umask 002
|
|
||||||
cd $OBJ_DIR &&
|
|
||||||
$MFILE &&
|
|
||||||
$MFILES &&
|
|
||||||
$CLEAN &&
|
|
||||||
$MKINCLUDES &&
|
|
||||||
$DEPEND &&
|
|
||||||
$BUILD 2>&1 | tee $OBJ_DIR_LOG 1>$MAKE_FILE &&
|
|
||||||
$LINT 1>$LINT_LOG 2>&1"
|
|
||||||
eval "$COMMAND" 1>$ALL_MAKE 2>&1
|
|
||||||
fi # apollo || prism
|
|
||||||
fi # BE
|
|
||||||
|
|
||||||
|
|
||||||
LETTER=/tmp/allOK.$$
|
|
||||||
STORAGEDIR=`/bin/pwd`
|
|
||||||
|
|
||||||
END_TIME="`$DATECMD +%d`_`$DATECMD +%H`:`$DATECMD +%M`:`$DATECMD +%S`"
|
|
||||||
|
|
||||||
END_TIME_LONG=`$DATECMD`
|
|
||||||
|
|
||||||
echo "master_build for $FOCUS_DIR on machine $SYSNAME " > $LETTER
|
|
||||||
echo " " >> $LETTER
|
|
||||||
echo " started at $START_TIME_LONG" >> $LETTER
|
|
||||||
echo " " >> $LETTER
|
|
||||||
echo " and finished at $END_TIME_LONG" >> $LETTER
|
|
||||||
echo "" >> $LETTER
|
|
||||||
echo "Summary: $SYSNAME $FOCUS_DIR $STORAGEDIR $START_TIME $END_TIME" >> $LETTER
|
|
||||||
echo "" >> $LETTER
|
|
||||||
cp $LETTER $SUMMARY_FILE
|
|
||||||
if [ "$SENDMAIL" = "TRUE" ] && [ "$BUILD_WATCH" ]
|
|
||||||
then
|
|
||||||
mailx -s"master_build for $FOCUS_DIR finished at `date`" $BUILD_WATCH < $LETTER
|
|
||||||
fi
|
|
||||||
rm -f $LETTER
|
|
||||||
fi # COMPILE || DOLINT
|
|
||||||
|
|
||||||
if [ "$DOBINSTALL" ];then
|
|
||||||
echo "Running make binstall on \"$OBJ_DIR\"."
|
|
||||||
if [ "$BINSTALL_PATH" ];then
|
|
||||||
BINSTALL="make $IGNORE BINSTALLPATH=$BINSTALL_PATH binstall";
|
|
||||||
else
|
|
||||||
BINSTALL="make $IGNORE binstall";
|
|
||||||
fi
|
|
||||||
cd $OBJ_DIR && $BINSTALL 1>$BINSTALL_LOG 2>&1
|
|
||||||
if [ "$DOCLEANBINSTALL" ];then
|
|
||||||
echo "Running clean binstall on \"$CLEANBINSTALLPATH\""
|
|
||||||
$CLEANBINSTALL $CLEANBINSTALLPATH $LATESTDIR $NUMBINSTALLDIRSLEFT 1>$CLEANBINSTALL_LOG 2>&1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
exit 0
|
|
|
@ -1,55 +0,0 @@
|
||||||
#! /usr/local/bin/perl
|
|
||||||
|
|
||||||
eval "exec /usr/local/bin/perl -S $0 $*"
|
|
||||||
if $running_under_some_shell;
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
#
|
|
||||||
# File: mkPreviousLink
|
|
||||||
# RCS: $XConsortium: mkPreviousLink /main/3 1995/10/30 13:44:16 rswiston $
|
|
||||||
# Author: John Herberg
|
|
||||||
# Created: 4/13/94
|
|
||||||
# Language: perl
|
|
||||||
# Package:
|
|
||||||
# Status
|
|
||||||
#
|
|
||||||
# (c) Copyright 1994, Hewlett-Packard, all rights reserved.
|
|
||||||
#
|
|
||||||
# Usage: mkPreviousLink <directory>
|
|
||||||
#
|
|
||||||
# Description: Copies latest link in directory to previous.
|
|
||||||
#
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# printUsage - print sytax of script and die
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
sub printUsage
|
|
||||||
{
|
|
||||||
die "Usage: mkPreviousLink <binstallpath>\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
###
|
|
||||||
### Start main
|
|
||||||
###
|
|
||||||
|
|
||||||
&printUsage() if ((@ARGV != 1) || ($ARGV[0] =~ /^-/o));
|
|
||||||
|
|
||||||
$tree=$ARGV[0];
|
|
||||||
$_ = "$tree/latest";
|
|
||||||
|
|
||||||
### Resolve link
|
|
||||||
|
|
||||||
( -l ) || die "*** Error: $_ is not a symbolic link\n";
|
|
||||||
defined($ldest = readlink) || die "*** Error: Failed to resolve link, $_ $ldest\n";
|
|
||||||
|
|
||||||
### Create "previous" link
|
|
||||||
|
|
||||||
chdir($tree) || die "*** Error: Failed to change directory to $tree\n";
|
|
||||||
unlink("previous");
|
|
||||||
symlink($ldest, "previous") ||
|
|
||||||
die "*** Error: Could not create link, $tree/previous -> $ldest\n";
|
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
#this script is set to provide access to remote builds and pass the
|
|
||||||
# appropriate options to the remote machines
|
|
||||||
# Marc Ayotte 2/5/90
|
|
||||||
|
|
||||||
USAGE="USAGE: remote_build <remotehost> [Remoteoptions ..]
|
|
||||||
see master_build for details on options"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if [ $# -lt 1 ];then
|
|
||||||
echo ""
|
|
||||||
echo "$USAGE"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
REMOTEHOST=$1
|
|
||||||
shift
|
|
||||||
|
|
||||||
remsh $REMOTEHOST "/x/cdesrc/admin/BuildTools/master_build/master_build $*"
|
|
|
@ -1,9 +0,0 @@
|
||||||
/* $XConsortium: README /main/2 1996/07/15 13:57:35 drk $ */
|
|
||||||
This directory is for information for setup for a user or administrator's
|
|
||||||
system.
|
|
||||||
This is a readme for anything that goes in this directory.
|
|
||||||
|
|
||||||
perl.hp.tar.Z - 8/10/93 - the 9.0 hp perl package. untar in /.
|
|
||||||
perl.ibm.tar.Z - 8/10/93 - the AIX 3.2 ibm perl package. untar in /.
|
|
||||||
perl.sun.tar.Z - 01/18/94 - the SunOS 5.3 perl package. untar in /.
|
|
||||||
installtools - setup script - DO NOT USE YET!!!
|
|
|
@ -1,22 +0,0 @@
|
||||||
#! /bin/ksh
|
|
||||||
# This script checks to see if the system release is OK and the compiler
|
|
||||||
# is OK on hpux.
|
|
||||||
|
|
||||||
RELEASE=`uname -r|fgrep '9.05' 2>/dev/null`
|
|
||||||
|
|
||||||
if [ ! "$RELEASE" ];then
|
|
||||||
echo " System Release Incorrect. uname -r should be 9.05"
|
|
||||||
echo " system is instead `uname -r`"
|
|
||||||
echo ""
|
|
||||||
fi
|
|
||||||
|
|
||||||
COMPILER=`what /bin/c89 |fgrep '9.68' 2>/dev/null`
|
|
||||||
|
|
||||||
if [ ! "$COMPILER" ];then
|
|
||||||
echo " Compiler version is Incorrect. It should be 9.68"
|
|
||||||
echo " Instead it is:"
|
|
||||||
what /bin/c89
|
|
||||||
echo ""
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
|
@ -1,144 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
#set -x
|
|
||||||
######################################################################
|
|
||||||
# check to see if the system release is OK and build environments are OK
|
|
||||||
# on an AIX build box
|
|
||||||
# Yanling Qi (yanling@austin.ibm.com) (512-838-2846)
|
|
||||||
######################################################################
|
|
||||||
#
|
|
||||||
Lslpp()
|
|
||||||
{
|
|
||||||
/bin/lslpp -lc $1|grep "usr"|grep -v "AVAILABLE"
|
|
||||||
}
|
|
||||||
#
|
|
||||||
# (1) check oslevel
|
|
||||||
#
|
|
||||||
OSLEVEL=$(/bin/oslevel |fgrep '3250')
|
|
||||||
print "\nCheck OS level......"
|
|
||||||
if [ "XX$OSLEVEL" = "XX" ]; then
|
|
||||||
echo " System Release Incorrect. /bin/oslevel should be 3250"
|
|
||||||
echo " system is instead `/bin/oslevel`"
|
|
||||||
echo ""
|
|
||||||
else
|
|
||||||
echo " Check oslevel Passed"
|
|
||||||
fi
|
|
||||||
#
|
|
||||||
# (2) check basic operating system package (/usr/bin /usr/lpp and some
|
|
||||||
# /usr/lib /usr/bin/ld
|
|
||||||
#
|
|
||||||
print "\nCheck basic operating system package......"
|
|
||||||
Lslpp bos.obj |awk -F: '{
|
|
||||||
if ($1 ~ "usr")
|
|
||||||
{
|
|
||||||
if($2 == "bos.obj 03.02.00.00" && ($3 == "COMMITTED" || $3 == "APPLIED"))
|
|
||||||
printf(" Check base Operating System Package: Passed\n");
|
|
||||||
else {
|
|
||||||
printf("Package should be: bos.obj 03.02.00.00\n")
|
|
||||||
printf(" yours is: %s\n",$0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else # missing this package
|
|
||||||
printf("Package bos.obj 03.02.00.00 is missing\n")
|
|
||||||
}'
|
|
||||||
|
|
||||||
#
|
|
||||||
# (3) Check C++ compliler
|
|
||||||
print "\nCheck C++ compliler......"
|
|
||||||
Lslpp xlCcmp.obj |awk -F: '{
|
|
||||||
if ($1 ~ "usr")
|
|
||||||
if($2 == "xlCcmp.obj 01.01.02.29" && ($3 == "COMMITTED" || $3 == "APPLIED"))
|
|
||||||
printf(" Check AIX XL C++ Compiler/6000 Package: Passed\n");
|
|
||||||
else{
|
|
||||||
printf(" Package should be xlCcmp.obj 01.01.02.29\n")
|
|
||||||
printf(" yours is: %s\n",$0);
|
|
||||||
|
|
||||||
}
|
|
||||||
else # missing this package
|
|
||||||
printf("Package xlCcmp.obj 01.01.02.29 is missing\n");
|
|
||||||
}'
|
|
||||||
#
|
|
||||||
# (4) check C++ lib /usr/lpp/xlC/lib/libC.a
|
|
||||||
# /usr/lpp/xlC/lib/profiled/libC.a
|
|
||||||
|
|
||||||
#
|
|
||||||
print "\nCheck C++ lib......"
|
|
||||||
Lslpp xlCrte.obj|awk -F: '{
|
|
||||||
if ($1 ~ "usr")
|
|
||||||
if($2 == "xlCrte.obj 01.01.02.29" && ($3 == "COMMITTED" || $3 == "APPLIED"))
|
|
||||||
printf(" Check AIX XL C++ Compiler/6000 Runtime Package: Passed\n");
|
|
||||||
else{
|
|
||||||
printf(" Package should be xlCrte.obj 01.01.02.29\n")
|
|
||||||
printf(" yours is: %s\n",$0);
|
|
||||||
|
|
||||||
}
|
|
||||||
else # missing this package
|
|
||||||
printf("Package xlCrte.obj 01.01.02.29 is missing\n");
|
|
||||||
}'
|
|
||||||
#
|
|
||||||
# (5) check c compliler
|
|
||||||
#
|
|
||||||
print "\nCheck xl c compiler......"
|
|
||||||
Lslpp xlccmp.obj |awk -F: '{
|
|
||||||
if ($1 ~ "usr")
|
|
||||||
if($2 == "xlccmp.obj 01.03.00.12" && ($3 == "COMMITTED" || $3 == "APPLIED"))
|
|
||||||
printf(" Check AIX XL C Compiler Package: Passed\n");
|
|
||||||
else{
|
|
||||||
printf(" Package should be xlccmp.obj 01.03.00.12\n")
|
|
||||||
printf(" yours is: %s\n",$0);
|
|
||||||
|
|
||||||
}
|
|
||||||
else # missing this package
|
|
||||||
printf("Package xlccmp.obj 01.03.00.12 is missing\n");
|
|
||||||
}'
|
|
||||||
#
|
|
||||||
# (6) check Base Application Development Toolkit
|
|
||||||
# cpp lex yacc
|
|
||||||
#
|
|
||||||
print "\nCheck Base Application Development Toolkit......"
|
|
||||||
Lslpp bosadt.bosadt.obj |awk -F: '{
|
|
||||||
if ($1 ~ "usr")
|
|
||||||
if($2 == "bosadt.bosadt.obj 03.02.00.00" && ($3 == "COMMITTED" || $3 == "APPLIED"))
|
|
||||||
printf(" Check Base Application Development Toolkit Package: Passed\n");
|
|
||||||
else{
|
|
||||||
printf(" Package should be bosadt.bosadt.obj 03.02.00.00\n")
|
|
||||||
printf(" yours is: %s\n",$0);
|
|
||||||
|
|
||||||
}
|
|
||||||
else # missing this package
|
|
||||||
printf("Package bosadt.bosadt.obj 03.02.00.00 is missing\n");
|
|
||||||
}'
|
|
||||||
#
|
|
||||||
# (7) check Base Development Libraries & Include files
|
|
||||||
# cpp lex yacc
|
|
||||||
#
|
|
||||||
print "\nCheck Base Development Libraries & Include files......"
|
|
||||||
Lslpp bosadt.lib.obj |awk -F: '{
|
|
||||||
if ($1 ~ "usr")
|
|
||||||
if($2 == "bosadt.lib.obj 03.02.00.00" && ($3 == "COMMITTED" || $3 == "APPLIED"))
|
|
||||||
printf(" Check Base Development Libraries & Include files Package: Passed\n");
|
|
||||||
else{
|
|
||||||
printf(" Package should be bosadt.lib.obj 03.02.00.00\n")
|
|
||||||
printf(" yours is: %s\n",$0);
|
|
||||||
|
|
||||||
}
|
|
||||||
else # missing this package
|
|
||||||
printf("Package bosadt.lib.obj 03.02.00.00 is missing\n");
|
|
||||||
}'
|
|
||||||
|
|
||||||
#
|
|
||||||
# (8) check X Development Libraries and Include Files
|
|
||||||
#
|
|
||||||
#
|
|
||||||
print "\nCheck X Development Libraries and Include Files......"
|
|
||||||
Lslpp X11dev.obj |awk -F: '{
|
|
||||||
if ($1 ~ "usr")
|
|
||||||
if($2 == "X11dev.obj 01.02.03.00" && ($3 == "COMMITTED" || $3 == "APPLIED"))
|
|
||||||
printf(" Check X Development Libraries and Include Files Package: Passed\n");
|
|
||||||
else{
|
|
||||||
printf(" Package should be X11dev.obj 01.02.03.00\n")
|
|
||||||
printf(" yours is: %s\n",$0);
|
|
||||||
|
|
||||||
}
|
|
||||||
else # missing this package
|
|
||||||
printf("Package X11dev.obj 01.02.03.00 is missing\n");
|
|
||||||
}'
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,158 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
#
|
|
||||||
# build_id
|
|
||||||
#
|
|
||||||
########################################################################
|
|
||||||
# set -x
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Script setup: THIS NEEDS TO BE FIRST
|
|
||||||
#
|
|
||||||
SCRIPTS_DIR="`dirname $0`"
|
|
||||||
if [ "" = "$SCRIPTS_DIR" ]; then
|
|
||||||
SCRIPTS_DIR=/project/dt/scripts
|
|
||||||
fi
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Script specific global variables
|
|
||||||
#
|
|
||||||
##########################################################################
|
|
||||||
##########################################################################
|
|
||||||
PROG_NAME="$0"
|
|
||||||
LOG_DIR="/project/dt/admin/mkid"
|
|
||||||
LOG_FILE="cdeID"
|
|
||||||
LOG_PATH=""
|
|
||||||
|
|
||||||
DO_X_BUILD="False"
|
|
||||||
DO_MOTIF_BUILD="False"
|
|
||||||
DO_CDE_BUILD="False"
|
|
||||||
DO_CDEDOC_BUILD="False"
|
|
||||||
DO_CDETEST_BUILD="False"
|
|
||||||
|
|
||||||
DO_DEBUG="False"
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
|
|
||||||
usage ()
|
|
||||||
{
|
|
||||||
cat <<eof
|
|
||||||
USAGE: $1
|
|
||||||
[-e | -dev] # Default: build x11, motif and cde
|
|
||||||
[-x | -x11] # Build x11 only
|
|
||||||
[-m | -motif] # Build motif only
|
|
||||||
[-c | -cde] # Build cde only
|
|
||||||
[-t | -cdetest] # Build cde tests only
|
|
||||||
[-a | -all] # Build x11, motif, cde, cdedoc and cdetest
|
|
||||||
[-debug] # Debugging output
|
|
||||||
[{-ld | -log_dir} <dirpath>]
|
|
||||||
# Specify an alternate log directory.
|
|
||||||
# Default: $LOG_DIR
|
|
||||||
[{-lf | -log_file} <filename>]
|
|
||||||
# Specify an alternate log file relative to $LOG_DIR.
|
|
||||||
# Default: $LOG_FILE
|
|
||||||
[{-lp | -log_path} <path>]
|
|
||||||
# Specify an alternate log directory.
|
|
||||||
# Default: $LOG_DIR/$LOG_FILE
|
|
||||||
[-h | -? | -help] # Print usage and exit
|
|
||||||
eof
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
|
|
||||||
while [ $# -gt 0 ]; do
|
|
||||||
case $1 in
|
|
||||||
-e | -dev) DO_X_BUILD="True"
|
|
||||||
DO_MOTIF_BUILD="True"
|
|
||||||
DO_CDE_BUILD="True"
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
-x | -x11) DO_X_BUILD="True"
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
-m | -motif) DO_MOTIF_BUILD="True"
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
-c | -cde) DO_CDE_BUILD="True"
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
-t | -cdetest) DO_CDETEST_BUILD="True";
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
-a | -all) DO_X_BUILD="True"
|
|
||||||
DO_MOTIF_BUILD="True"
|
|
||||||
DO_CDE_BUILD="True"
|
|
||||||
DO_CDEDOC_BUILD="True"
|
|
||||||
DO_CDETEST_BUILD="True"
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
-debug) DO_DEBUG="True"
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
-ld | -log_dir) LOG_DIR=$2; shift 2 ;;
|
|
||||||
|
|
||||||
-lf | -log_file) LOG_FILE=$2; shift 2 ;;
|
|
||||||
|
|
||||||
-lp | -log_path) LOG_PATH=$2; shift 2 ;;
|
|
||||||
|
|
||||||
-h | "-?" | -help | *) usage $PROG_NAME;
|
|
||||||
exit 1;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Script setup: Do this after the command line parsing to pick up
|
|
||||||
# an alternate setting of SCRIPTS_DIR
|
|
||||||
#
|
|
||||||
if [ ! -f $SCRIPTS_DIR/script_setup.ksh ]; then
|
|
||||||
print -u2 "$PRG: File '$SCRIPTS_DIR/script_setup.ksh' NOT found!"
|
|
||||||
print -u2 "$PRG: Exiting ..."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
. $SCRIPTS_DIR/script_setup.ksh
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# If no project was selected, then build the 'dev' projects
|
|
||||||
#
|
|
||||||
PROJECTS=""
|
|
||||||
if [ "True" = $DO_X_BUILD ]; then
|
|
||||||
PROJECTS="$PROJECTS $X_TOP"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "True" = $DO_MOTIF_BUILD ]; then
|
|
||||||
PROJECTS="$PROJECTS $MOTIF_TOP"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "True" = $DO_CDE_BUILD ]; then
|
|
||||||
PROJECTS="$PROJECTS $CDE_TOP"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "True" = $DO_CDETEST_BUILD ]; then
|
|
||||||
PROJECTS="$PROJECTS $CDETEST_TOP"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$PROJECTS" ]; then
|
|
||||||
PROJECTS="$X_TOP $MOTIF_TOP $CDE_TOP"
|
|
||||||
fi
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Set the log path
|
|
||||||
#
|
|
||||||
if [ -z "$LOG_PATH" ]; then
|
|
||||||
LOG_PATH=$LOG_DIR/$LOG_PATH
|
|
||||||
fi
|
|
||||||
|
|
||||||
/usr/local/bin/mkid -o$LOG_PATH $PROJECTS
|
|
||||||
|
|
||||||
#
|
|
||||||
# Clean up temporary files and exit
|
|
||||||
#
|
|
||||||
do_exit 0
|
|
|
@ -1,207 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
#
|
|
||||||
# build_project
|
|
||||||
#
|
|
||||||
########################################################################
|
|
||||||
# set -x
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Script setup: THIS NEEDS TO BE FIRST
|
|
||||||
#
|
|
||||||
SCRIPTS_DIR="`dirname $0`"
|
|
||||||
if [ "" = "$SCRIPTS_DIR" ]; then
|
|
||||||
SCRIPTS_DIR=/project/dt/scripts
|
|
||||||
fi
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Script setup:
|
|
||||||
#
|
|
||||||
if [ ! -f $SCRIPTS_DIR/script_setup.ksh ]; then
|
|
||||||
print -u2 "$PRG: File '$SCRIPTS_DIR/script_setup.ksh' NOT found!"
|
|
||||||
print -u2 "$PRG: Exiting ..."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
. $SCRIPTS_DIR/script_setup.ksh
|
|
||||||
|
|
||||||
PROG_NAME=$0
|
|
||||||
CDETEST_BUILD_COMMAND=$CDETEST_TOP/admin/BuildTools/master_build/test_build
|
|
||||||
BOOTSTRAPCFLAGS='BOOTSTRAPCFLAGS=""'
|
|
||||||
PROJECT=""
|
|
||||||
BUILD_TYPE="inc"
|
|
||||||
LOG_DIR="/tmp"
|
|
||||||
|
|
||||||
########################################################################
|
|
||||||
#
|
|
||||||
# usage -
|
|
||||||
#
|
|
||||||
usage ()
|
|
||||||
{
|
|
||||||
cat <<eof
|
|
||||||
USAGE: $1
|
|
||||||
{-p | -project} {x11 | motif | cde | cdedoc | cde-test}
|
|
||||||
[-c | -clean] # Do a clean build; the default is incremental
|
|
||||||
[{-t | -top} <dir>]
|
|
||||||
[{-l | -log_dir} <dir>] # Only used with project cde-test
|
|
||||||
# Default TOP for x11 is '$X_TOP'.
|
|
||||||
# Default TOP for motif is '$MOTIF_TOP'.
|
|
||||||
# Default TOP for cde is '$CDE_TOP'.
|
|
||||||
# Default TOP for cdedoc is '$CDEDOC_TOP'.
|
|
||||||
# Default TOP for cde-test is '$CDETEST_TOP'.
|
|
||||||
[-h | -? | -help] # Print usage and exit
|
|
||||||
eof
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
########################################################################
|
|
||||||
#
|
|
||||||
# Parse command line
|
|
||||||
#
|
|
||||||
while [ $# -gt 0 ]; do
|
|
||||||
case $1 in
|
|
||||||
-p | -project) PROJECT=$2; shift 2 ;;
|
|
||||||
-c | -clean) BUILD_TYPE="clean"; shift 1 ;;
|
|
||||||
-t | -top) TOP=$2; shift 2 ;;
|
|
||||||
-l | -log_dir) LOG_DIR=$2; shift 2 ;;
|
|
||||||
-h | -? | -help | *) usage $PROG_NAME;
|
|
||||||
exit 1;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ "" = "$PROJECT" ]; then
|
|
||||||
usage $PROG_NAME
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
########################################################################
|
|
||||||
#
|
|
||||||
# Define OS-specific variables
|
|
||||||
#
|
|
||||||
case "`uname -s`" in
|
|
||||||
|
|
||||||
SunOS) if [ "4.1.4" = "`uname -r`" ]; then
|
|
||||||
export PATH=$PATH:/usr/local/bin
|
|
||||||
else
|
|
||||||
export PATH=/opt/SUNWspro/bin:/usr/ccs/bin:$PATH:/usr/local/bin
|
|
||||||
export LM_LICENSE_FILE=/opt/SUNWspro/license_dir/license.dat
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
UNIX_System_V) BOOTSTRAPCFLAGS="BOOTSTRAPCFLAGS=-D__uxp__"
|
|
||||||
export PATH=/usr/ccs/bin:$PATH:/usr/local/bin
|
|
||||||
print -u1 "$PROG_NAME: Setting $BOOTSTRAPCFLAGS" ;;
|
|
||||||
|
|
||||||
UNIX_SV) export PATH=$PATH:/usr/local/bin
|
|
||||||
print -u1 "$PROG_NAME: Setting $BOOTSTRAPCFLAGS" ;;
|
|
||||||
|
|
||||||
IRIX) export PATH=$PATH:/usr/sbin ;;
|
|
||||||
|
|
||||||
HP-UX) export PATH=$PATH:/usr/ccs/bin ;;
|
|
||||||
|
|
||||||
Linux) export PATH=$PATH:/usr/bin:/usr/local/bin ;;
|
|
||||||
|
|
||||||
*) export PATH=$PATH:/usr/local/bin ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
|
|
||||||
########################################################################
|
|
||||||
#
|
|
||||||
# Set the cwd
|
|
||||||
#
|
|
||||||
if [ "" = "$TOP" ]; then
|
|
||||||
case $PROJECT in
|
|
||||||
x | x11) cd $X_TOP ;;
|
|
||||||
|
|
||||||
motif) cd $MOTIF_TOP ;;
|
|
||||||
|
|
||||||
cde) cd $CDE_TOP ;;
|
|
||||||
|
|
||||||
cdedoc) cd $CDEDOC_TOP ;;
|
|
||||||
|
|
||||||
cde-test) cd $CDETEST_TOP ;;
|
|
||||||
|
|
||||||
*) print -u2 "Exiting ... Project '$PROJECT' is NOT supported!"
|
|
||||||
exit 1
|
|
||||||
esac
|
|
||||||
else
|
|
||||||
cd $TOP
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
########################################################################
|
|
||||||
#
|
|
||||||
# Audits
|
|
||||||
#
|
|
||||||
if [ $PROJECT != "cde-test" -a ! -f Makefile ]; then
|
|
||||||
print -u2 "Exiting ... No Makefile is in the '`pwd`' directory!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
########################################################################
|
|
||||||
#
|
|
||||||
# Run the build script
|
|
||||||
#
|
|
||||||
case $BUILD_TYPE in
|
|
||||||
|
|
||||||
clean)
|
|
||||||
case $PROJECT in
|
|
||||||
x | x11 | motif)
|
|
||||||
TARGET=World ;;
|
|
||||||
cde)
|
|
||||||
TARGET=World.dev ;;
|
|
||||||
cdedoc)
|
|
||||||
TARGET=World.doc ;;
|
|
||||||
cde-test)
|
|
||||||
FLAGS="-c -w" ;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
|
|
||||||
inc)
|
|
||||||
case $PROJECT in
|
|
||||||
x | x11 | motif)
|
|
||||||
TARGET=Everything ;;
|
|
||||||
cde)
|
|
||||||
TARGET=Everything.dev ;;
|
|
||||||
cdedoc)
|
|
||||||
TARGET=Everything.doc ;;
|
|
||||||
cde-test)
|
|
||||||
FLAGS=-c ;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
|
|
||||||
case $PROJECT in
|
|
||||||
|
|
||||||
x | x11 | motif | cde | cdedoc)
|
|
||||||
case "`uname -s`" in
|
|
||||||
UNIX_SV)
|
|
||||||
if [ "" = "$TOP" ]; then
|
|
||||||
make -k BOOTSTRAPCFLAGS="-DSVR4 -Di386" $TARGET
|
|
||||||
else
|
|
||||||
make -k BOOTSTRAPCFLAGS="-DSVR4 -Di386" $TARGET TOP=$TOP
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
Linux)
|
|
||||||
if [ "" = "$TOP" ]; then
|
|
||||||
make -k $TARGET
|
|
||||||
else
|
|
||||||
make -k $TARGET TOP=$TOP
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
if [ "" = "$TOP" ]; then
|
|
||||||
make -k "$BOOTSTRAPCFLAGS" $TARGET
|
|
||||||
else
|
|
||||||
make -k "$BOOTSTRAPCFLAGS" $TARGET TOP=$TOP
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
|
|
||||||
cde-test)
|
|
||||||
$CDETEST_BUILD_COMMAND -build $CDETEST_TOP $FLAGS -log $LOG_DIR ;;
|
|
||||||
esac
|
|
|
@ -1,751 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
#
|
|
||||||
# build_summary
|
|
||||||
#
|
|
||||||
########################################################################
|
|
||||||
#set -x
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Script setup: THIS NEEDS TO BE FIRST
|
|
||||||
#
|
|
||||||
SCRIPTS_DIR="`dirname $0`"
|
|
||||||
PROG_NAME="`basename $0`"
|
|
||||||
if [ "" = "$SCRIPTS_DIR" ]; then
|
|
||||||
SCRIPTS_DIR=/project/dt/scripts
|
|
||||||
fi
|
|
||||||
if [ ! -f $SCRIPTS_DIR/script_setup.ksh ]; then
|
|
||||||
print -u2 "$PROG_NAME: File '$SCRIPTS_DIR/script_setup.ksh' NOT found!"
|
|
||||||
print -u2 "$PROG_NAME: Exiting ..."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
. $SCRIPTS_DIR/script_setup.ksh
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Script specific global variables
|
|
||||||
#
|
|
||||||
##########################################################################
|
|
||||||
##########################################################################
|
|
||||||
|
|
||||||
COMPONENTS_FILES=""
|
|
||||||
COMPONENTS="all"
|
|
||||||
DEBUG="False"
|
|
||||||
SUMMARY_FILES=""
|
|
||||||
NOT_DONE_SUMMARY_FILES=""
|
|
||||||
PRINT_ERRORS="5"
|
|
||||||
|
|
||||||
|
|
||||||
usage ()
|
|
||||||
{
|
|
||||||
cat <<eof
|
|
||||||
USAGE: $PROG_NAME
|
|
||||||
[{-c | -components_file} <file>]
|
|
||||||
# Specifies a file containing a list of components to
|
|
||||||
# be extracted. Multiple -c flags can be specified.
|
|
||||||
[{-e | -errors} <number>]
|
|
||||||
# Specifies the number of errors shown for each
|
|
||||||
# component in the components files. Defaults to all.
|
|
||||||
[-h | -? | -help]
|
|
||||||
# Print usage and exit
|
|
||||||
[{-l | -log_path} <path>]
|
|
||||||
[{-m | -mail | -mail_list} <user_name(s)>]
|
|
||||||
[{-pn | -project_name} <project_name>]
|
|
||||||
# The default is CDE. This impacts the Subject field
|
|
||||||
# when email is sent. Use "-pn X11" to get "X11" in
|
|
||||||
# the Subject field.
|
|
||||||
{-s | -summary_file} <file>
|
|
||||||
# Specifies a summary report from a build_world.
|
|
||||||
# $PROG_NAME accepts multiple -f flags.
|
|
||||||
eof
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# FUNCTION: is_complete_build <summary_file>
|
|
||||||
#
|
|
||||||
# Returns 0 if the build is complete.
|
|
||||||
# Returns 1 if the build is not complete
|
|
||||||
#
|
|
||||||
is_complete_build ()
|
|
||||||
{
|
|
||||||
typeset SUMMARY_FILE LCMPL
|
|
||||||
|
|
||||||
SUMMARY_FILE=$1
|
|
||||||
|
|
||||||
LCMPL=`grep "$BTAG_CMPL" $SUMMARY_FILE | tail -1`
|
|
||||||
if [ -z "$LCMPL" ]; then
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
#
|
|
||||||
# FUNCTION: print_build_start_end ()
|
|
||||||
#
|
|
||||||
# ViewName StartTime BuildStatus
|
|
||||||
# -------- --------- -----------
|
|
||||||
# cde-dec STARTED: Sun Jan 16, 23:34 FINISHED: Mon Jan 17, 23:34
|
|
||||||
# cde-hp STARTED: Sun Jan 16, 23:34 BUILDING: making all in ...
|
|
||||||
# cde-ibm STARTED: Sun Jan 16, 23:34 FINISHED: Mon Jan 17, 23:34
|
|
||||||
# cde-sco STARTED: Sun Jan 16, 23:34 FINISHED: Mon Jan 17, 23:34
|
|
||||||
# cde-sgi STARTED: Sun Jan 16, 23:34 FINISHED: Mon Jan 17, 23:34
|
|
||||||
# cde-sun STARTED: Sun Jan 16, 23:34 FINISHED: Mon Jan 17, 23:34
|
|
||||||
#
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
print_build_start_end ()
|
|
||||||
{
|
|
||||||
typeset CMPL LOGD PRJT DATE VIEW
|
|
||||||
typeset AWK_START_END_SUMMARY
|
|
||||||
|
|
||||||
AWK_START_END_SUMMARY='{printf("%-12s %-28s %-28s\n", $1,$2,$3)}'
|
|
||||||
|
|
||||||
echo "ViewName StartTime BuildStatus" | awk "$AWK_START_END_SUMMARY"
|
|
||||||
echo "-------- --------- -----------" | awk "$AWK_START_END_SUMMARY"
|
|
||||||
|
|
||||||
for r in $SUMMARY_FILES
|
|
||||||
do
|
|
||||||
VIEW=`grep "$BTAG_VIEW" $r | head -1 | awk '{printf("%s", $NF)}'`
|
|
||||||
DATE=`grep "$BTAG_DATE" $r | head -1 | awk '{printf("%s", $NF)}' FS=+`
|
|
||||||
|
|
||||||
is_complete_build $r
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
CMPL=`grep "$BTAG_CMPL" $r | tail -1 |
|
|
||||||
awk '{printf("%s", $NF)}' FS=+`
|
|
||||||
echo "$VIEW|STARTED: $DATE|FINISHED: $CMPL" | \
|
|
||||||
awk "$AWK_START_END_SUMMARY" FS="|"
|
|
||||||
else
|
|
||||||
LOGD=`grep "$BTAG_LOGD" $r | head -1 | awk '{printf("%s", $NF)}'`
|
|
||||||
PRJT=`grep "$BTAG_PRJT" $r | tail -1 | awk '{printf("%s", $NF)}'`
|
|
||||||
LOGF=$LOGD/$PRJT.log
|
|
||||||
if [ -f $LOGF ]; then
|
|
||||||
CMPL=`$EXTRACT_MSG -m $BUILD_MSGS -l $LOGF | tail -1`
|
|
||||||
else
|
|
||||||
CMPL=""
|
|
||||||
fi
|
|
||||||
echo "$VIEW|STARTED: $DATE|BUILDING: $CMPL" | \
|
|
||||||
awk "$AWK_START_END_SUMMARY" FS="|"
|
|
||||||
fi
|
|
||||||
|
|
||||||
done
|
|
||||||
print -u1
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
#
|
|
||||||
# FUNCTION: print_build_parameters ()
|
|
||||||
#
|
|
||||||
# ViewName Type ConfigSpec Platfm Projects
|
|
||||||
# -------- ---- ---------- ------ --------
|
|
||||||
# cde-dec clean cde-next.cs dec x11,motif,cde
|
|
||||||
# cde-hp clean cde-next.cs hp x11,motif,cde
|
|
||||||
# cde-ibm clean cde-next.cs ibm x11,motif,cde
|
|
||||||
# cde-sco clean cde-next.cs sco x11,motif,cde
|
|
||||||
# cde-sgi clean cde-next.cs sgi x11,motif,cde
|
|
||||||
# cde-sun clean cde-next.cs sun x11,motif,cde
|
|
||||||
#
|
|
||||||
# ViewName LogDirectory
|
|
||||||
# -------- ------------
|
|
||||||
# cde-dec /project/dt/logs/build/cde-dec/LATEST -> ./Jan.17.12:24:36
|
|
||||||
# cde-hp /project/dt/logs/build/cde-hp/LATEST -> ./Jan.17.12:24:36
|
|
||||||
# cde-ibm /project/dt/logs/build/cde-ibm/LATEST -> ./Jan.17.12:24:36
|
|
||||||
# cde-sco /project/dt/logs/build/cde-sco/LATEST -> ./Jan.17.12:24:36
|
|
||||||
# cde-sgi /project/dt/logs/build/cde-sgi/LATEST -> ./Jan.17.12:24:36
|
|
||||||
# cde-sun /project/dt/logs/build/cde-sun/LATEST -> ./Jan.17.12:24:36
|
|
||||||
#
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
print_build_parameters ()
|
|
||||||
{
|
|
||||||
typeset CMPL CSPS LOGD PRJT PTFM STRT TYPE VIEW
|
|
||||||
typeset AWK_LOG_SUMMARY AWK_BUILD_SUMMARY
|
|
||||||
|
|
||||||
AWK_LOG_SUMMARY='{printf("%-12s %-48s\n", $1,$2)}'
|
|
||||||
AWK_BUILD_SUMMARY='{printf("%-12s %-6s %-16s %-14s %-16s\n",$1,$2,$3,$4,$5)}'
|
|
||||||
|
|
||||||
#
|
|
||||||
# Section 1: Type/ConfigSpec/Platform/Projects
|
|
||||||
#
|
|
||||||
echo "ViewName Type ConfigSpec Platfm Projects" | awk "$AWK_BUILD_SUMMARY"
|
|
||||||
echo "-------- ---- ---------- ------ --------" | awk "$AWK_BUILD_SUMMARY"
|
|
||||||
|
|
||||||
for r in $SUMMARY_FILES
|
|
||||||
do
|
|
||||||
CSPC=`grep "$BTAG_CFGS" $r | head -1 | awk '{printf("%s", $NF)}'`
|
|
||||||
PRJT=`grep "$BTAG_PRJT" $r | awk '{printf("%s ", $NF)}'`
|
|
||||||
PTFM=`grep "$BTAG_PTFM" $r | head -1 | awk '{printf("%s", $NF)}'`
|
|
||||||
TYPE=`grep "$BTAG_TYPE" $r | head -1 | awk '{printf("%s", $NF)}'`
|
|
||||||
if [ "incremental" = "$TYPE" ]; then
|
|
||||||
TYPE="incrmt"
|
|
||||||
fi
|
|
||||||
VIEW=`grep "$BTAG_VIEW" $r | head -1 | awk '{printf("%s", $NF)}'`
|
|
||||||
|
|
||||||
echo "$VIEW|$TYPE|$CSPC|$PTFM|$PRJT" | awk "$AWK_BUILD_SUMMARY" FS="|"
|
|
||||||
done
|
|
||||||
print -u1
|
|
||||||
|
|
||||||
#
|
|
||||||
# Section 2: LogDirectory
|
|
||||||
#
|
|
||||||
echo "ViewName LogDirectory" | awk "$AWK_LOG_SUMMARY"
|
|
||||||
echo "-------- ------------" | awk "$AWK_LOG_SUMMARY"
|
|
||||||
|
|
||||||
for r in $SUMMARY_FILES
|
|
||||||
do
|
|
||||||
LOGD=`grep "$BTAG_LOGD" $r | head -1 | awk '{printf("%s", $NF)}'`
|
|
||||||
if [ -L $LOGD ]; then
|
|
||||||
LOGD=`ls -l $LOGD | awk '{printf("%s %s %s", $9, $10, $11)}'`
|
|
||||||
fi
|
|
||||||
VIEW=`grep "$BTAG_VIEW" $r | head -1 | awk '{printf("%s", $NF)}'`
|
|
||||||
|
|
||||||
echo "$VIEW|$LOGD" | awk "$AWK_LOG_SUMMARY" FS="|"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
#
|
|
||||||
# FUNCTION: print_error_and_warning_summaries_by_project ()
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# Project x11 motif cde cdedoc cde-test
|
|
||||||
# ViewName Errrs Warns Errrs Warns Errrs Warns Errrs Warns Errrs Warns
|
|
||||||
# -------- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
|
|
||||||
# build-dec-cde 0 0 0 0 0 554 DNR DNR DNR DNR
|
|
||||||
# build-hp-cde 0 0 0 0 0 554 DNR DNR DNR DNR
|
|
||||||
# build-ibm-cde 0 0 0 0 0 554 DNR DNR DNR DNR
|
|
||||||
# build-sco-cde 0 0 0 0 0 554 DNR DNR DNR DNR
|
|
||||||
# build-sgi-cde 0 0 0 0 DNR DNR DNR DNR DNR DNR
|
|
||||||
# build-sun-cde 0 0 0 0 0 554 DNR DNR DNR DNR
|
|
||||||
#
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
print_error_and_warning_summaries_by_project ()
|
|
||||||
{
|
|
||||||
BLANKS=" "
|
|
||||||
PROJ_CDE="cde"
|
|
||||||
PROJ_CDD="cdedoc"
|
|
||||||
PROJ_CDT="cde-test"
|
|
||||||
PROJ_MTF="motif"
|
|
||||||
PROJ_X11="x11"
|
|
||||||
AWK_PROJ_HEADER='{printf("%-12s %-12s %-12s %-12s %-12s %-12s\n",$1,$2,$3,$4,$5,$6)}'
|
|
||||||
AWK_PROJ_VIEWNAME='{printf("%-12s ", $1)}'
|
|
||||||
AWK_PROJ_SUMMARY='{printf("%5s %5s ", $1, $2)}'
|
|
||||||
|
|
||||||
#
|
|
||||||
# Print the header for this section
|
|
||||||
#
|
|
||||||
echo "Project $PROJ_X11 $PROJ_MTF $PROJ_CDE $PROJ_CDD $PROJ_CDT"|awk "$AWK_PROJ_HEADER"
|
|
||||||
|
|
||||||
echo "ViewName" | awk "$AWK_PROJ_VIEWNAME"
|
|
||||||
for p in $PROJ_X11 $PROJ_MTF $PROJ_CDE $PROJ_CDD $PROJ_CDT
|
|
||||||
do
|
|
||||||
echo "Errrs Warns" | awk "$AWK_PROJ_SUMMARY"
|
|
||||||
done
|
|
||||||
print -u1
|
|
||||||
|
|
||||||
echo "--------" | awk "$AWK_PROJ_VIEWNAME"
|
|
||||||
for p in $PROJ_X11 $PROJ_MTF $PROJ_CDE $PROJ_CDD $PROJ_CDT
|
|
||||||
do
|
|
||||||
echo "----- -----" | awk "$AWK_PROJ_SUMMARY"
|
|
||||||
done
|
|
||||||
print -u1
|
|
||||||
|
|
||||||
#
|
|
||||||
# Print the error and warning summaries for each view.
|
|
||||||
#
|
|
||||||
for r in $SUMMARY_FILES
|
|
||||||
do
|
|
||||||
#
|
|
||||||
# Print the view name.
|
|
||||||
#
|
|
||||||
VIEW=`grep "$BTAG_VIEW" $r | head -1 | awk '{printf("%s", $NF)}'`
|
|
||||||
echo "$VIEW" | awk "$AWK_PROJ_VIEWNAME"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Print the error and warn totals for each project.
|
|
||||||
#
|
|
||||||
for p in $PROJ_X11 $PROJ_MTF $PROJ_CDE $PROJ_CDD $PROJ_CDT
|
|
||||||
do
|
|
||||||
ERRRS=`grep "^$p " $r | tail -1 | awk '{print $2}'`
|
|
||||||
WARNS=`grep "^$p " $r | tail -1 | awk '{print $4}'`
|
|
||||||
|
|
||||||
if [ -z "$ERRRS" ] -a [ -z "$WARNS" ]
|
|
||||||
then
|
|
||||||
echo "DNR DNR" | awk "$AWK_PROJ_SUMMARY"
|
|
||||||
else
|
|
||||||
echo "$ERRRS $WARNS" | awk "$AWK_PROJ_SUMMARY"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
#
|
|
||||||
# Print a newline.
|
|
||||||
#
|
|
||||||
print -u1
|
|
||||||
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
#
|
|
||||||
# FUNCTION: print_error_summaries_by_component ()
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# Component DEC HP IBM SCO SGI SUN
|
|
||||||
# --------- ----- ----- ----- ----- ----- -----
|
|
||||||
# cde/admin 0 0 0 0 0 5
|
|
||||||
# cde/lib/DtHelp 5 3 1 0 0 0
|
|
||||||
# cde/programs/dtwm 10 3 5 0 0 0
|
|
||||||
#
|
|
||||||
# cde-test/doc 133 22 1 0 45 0
|
|
||||||
#
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
print_error_summaries_by_component ()
|
|
||||||
{
|
|
||||||
AWK_COMP_NAME='{printf("%-32s ", $1)}'
|
|
||||||
AWK_COMP_ERROR='{printf("%5s ", $1)}'
|
|
||||||
|
|
||||||
let num_errors=0
|
|
||||||
|
|
||||||
#
|
|
||||||
# Find the per component errors.
|
|
||||||
#
|
|
||||||
for f in $COMPONENTS_FILES
|
|
||||||
do
|
|
||||||
|
|
||||||
#
|
|
||||||
# Extract the project name from the name of the components file.
|
|
||||||
# Assumes the components files are named <project>.components.
|
|
||||||
#
|
|
||||||
p=`basename $f | awk '{ print $1 }' FS='.'`
|
|
||||||
|
|
||||||
for c in `cat $f`
|
|
||||||
do
|
|
||||||
#
|
|
||||||
# Collect the errors for the current component from the report
|
|
||||||
# summary files and put them in an array.
|
|
||||||
#
|
|
||||||
let i=0
|
|
||||||
FOUND="False"
|
|
||||||
for r in $SUMMARY_FILES
|
|
||||||
do
|
|
||||||
ERRORS[i]=`grep "$p/$c " $r | tail -1 | awk '{print $2}'`
|
|
||||||
|
|
||||||
#
|
|
||||||
# The search may have succeeded but the component may
|
|
||||||
# only have warnings and no errors. If this is true,
|
|
||||||
# then this component should not be added to the error
|
|
||||||
# list
|
|
||||||
#
|
|
||||||
if [ ! -z "`echo ${ERRORS[i]}`" ]; then
|
|
||||||
if [ "`echo ${ERRORS[i]}`" != "0" ]; then
|
|
||||||
FOUND="True"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
let i=i+1
|
|
||||||
done
|
|
||||||
|
|
||||||
#
|
|
||||||
# If the component doesn't show up anywhere ignore it.
|
|
||||||
#
|
|
||||||
if [ -z "`echo ${ERRORS[*]}`" -o "False" = "$FOUND" ]
|
|
||||||
then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
let num_errors=num_errors+1
|
|
||||||
|
|
||||||
if [ num_errors -eq 1 ]; then
|
|
||||||
#
|
|
||||||
# Print the header for this section
|
|
||||||
#
|
|
||||||
echo "Component" | awk "$AWK_COMP_NAME"
|
|
||||||
for r in $SUMMARY_FILES
|
|
||||||
do
|
|
||||||
PTFM=`grep "$BTAG_PTFM" $r | head -1 | awk '{printf("%s", $NF)}'`
|
|
||||||
echo "$PTFM" | awk "$AWK_COMP_ERROR"
|
|
||||||
done
|
|
||||||
print -u1
|
|
||||||
|
|
||||||
echo "---------" | awk "$AWK_COMP_NAME"
|
|
||||||
for r in $SUMMARY_FILES
|
|
||||||
do
|
|
||||||
echo "-----" | awk "$AWK_COMP_ERROR"
|
|
||||||
done
|
|
||||||
print -u1
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# Print the component name including the project it belongs to.
|
|
||||||
#
|
|
||||||
echo "$p/$c" | awk "$AWK_COMP_NAME"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Print the errors for this component.
|
|
||||||
#
|
|
||||||
for r in $SUMMARY_FILES
|
|
||||||
do
|
|
||||||
ERRRS=`grep "$p/$c " $r | tail -1 | awk '{print $2}'`
|
|
||||||
if [ -z "$ERRRS" ]
|
|
||||||
then
|
|
||||||
is_complete_build $r
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
ERRRS="0"
|
|
||||||
else
|
|
||||||
ERRRS="DNR"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
echo "$ERRRS" | awk "$AWK_COMP_ERROR"
|
|
||||||
done
|
|
||||||
|
|
||||||
#
|
|
||||||
# Print a newline.
|
|
||||||
#
|
|
||||||
print -u1
|
|
||||||
done
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ $num_errors -eq 0 ]; then
|
|
||||||
print -u1 "NO errors were found."
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
#
|
|
||||||
# FUNCTION: print_error_listings_by_component ()
|
|
||||||
#
|
|
||||||
# -------------------------------------------------------------------
|
|
||||||
# - <component-name>
|
|
||||||
# -------------------------------------------------------------------
|
|
||||||
# make all in <component-name>...
|
|
||||||
# error 1
|
|
||||||
# error 2
|
|
||||||
# make all in <component-name>/subdir...
|
|
||||||
# error 3
|
|
||||||
# error 4
|
|
||||||
#
|
|
||||||
###############################################################################
|
|
||||||
print_error_listings_by_component ()
|
|
||||||
{
|
|
||||||
let num_errors=0
|
|
||||||
|
|
||||||
for f in $COMPONENTS_FILES
|
|
||||||
do
|
|
||||||
|
|
||||||
#
|
|
||||||
# Extract the project name from the name of the components file.
|
|
||||||
# Assumes the components files are named <project>.components.
|
|
||||||
#
|
|
||||||
p=`basename $f | awk '{ print $1 }' FS='.'`
|
|
||||||
|
|
||||||
for c in `cat $f`
|
|
||||||
do
|
|
||||||
#
|
|
||||||
# Collect the errors for the current component from the
|
|
||||||
# report summary files and put them in an array.
|
|
||||||
#
|
|
||||||
let i=0
|
|
||||||
FOUND="False"
|
|
||||||
for r in $SUMMARY_FILES
|
|
||||||
do
|
|
||||||
ERRORS[i]=`grep "$p/$c " $r | tail -1 | awk '{print $2}'`
|
|
||||||
|
|
||||||
#
|
|
||||||
# The search may have succeeded but the component may
|
|
||||||
# only have warnings and no errors. If this is true,
|
|
||||||
# then this component should not be added to the error
|
|
||||||
# list
|
|
||||||
#
|
|
||||||
if [ ! -z "`echo ${ERRORS[i]}`" ]; then
|
|
||||||
if [ "`echo ${ERRORS[i]}`" != "0" ]; then
|
|
||||||
FOUND="True"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
let i=i+1
|
|
||||||
done
|
|
||||||
|
|
||||||
#
|
|
||||||
# If the component doesn't show up anywhere ignore it.
|
|
||||||
#
|
|
||||||
if [ -z "`echo ${ERRORS[*]}`" -o "False" = "$FOUND" ]
|
|
||||||
then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
let num_errors=num_errors+1
|
|
||||||
|
|
||||||
#
|
|
||||||
# Print the component name including the project it belongs to.
|
|
||||||
#
|
|
||||||
COMP=`echo $c | tr "/" ","`
|
|
||||||
print -u1 "+++++++++++++++++++++++++++++++++++++++++++++++++++++++"
|
|
||||||
print -u1 "+ COMPONENT: $p/$COMP"
|
|
||||||
print -u1 "+++++++++++++++++++++++++++++++++++++++++++++++++++++++"
|
|
||||||
print -u1
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# Print the errors for this component.
|
|
||||||
#
|
|
||||||
for r in $SUMMARY_FILES
|
|
||||||
do
|
|
||||||
LOGD=`grep "$BTAG_LOGD" $r | head -1 |
|
|
||||||
awk '{printf("%s", $NF)}'`
|
|
||||||
VIEW=`grep "$BTAG_VIEW" $r | head -1 |
|
|
||||||
awk '{printf("%s", $NF)}'`
|
|
||||||
|
|
||||||
ERR_FILE=$LOGD/$p/$COMP.err
|
|
||||||
if [ -f "$ERR_FILE" ]
|
|
||||||
then
|
|
||||||
print -u1 "+"
|
|
||||||
print -u1 "+ View: $VIEW"
|
|
||||||
print -u1 "+ Error File: $ERR_FILE"
|
|
||||||
print -u1 "+"
|
|
||||||
print -u1
|
|
||||||
head -$PRINT_ERRORS $ERR_FILE
|
|
||||||
print -u1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
#
|
|
||||||
# Print a newline.
|
|
||||||
#
|
|
||||||
print -u1
|
|
||||||
done
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ num_errors -eq 0 ]; then
|
|
||||||
print -u1 "NO errors were found."
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#############################################################################
|
|
||||||
#
|
|
||||||
# Do command-line processing
|
|
||||||
#
|
|
||||||
while [ $# -gt 0 ]; do
|
|
||||||
case $1 in
|
|
||||||
|
|
||||||
-debug)
|
|
||||||
DEBUG="True"
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
-c | -components_file)
|
|
||||||
if [ $# -lt 2 ]; then
|
|
||||||
print -u2 "$PROG_NAME: $1 option missing value; exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
COMPONENTS_FILES="$COMPONENTS_FILES $2"
|
|
||||||
shift 2 ;;
|
|
||||||
|
|
||||||
-e | -errors)
|
|
||||||
if [ $# -lt 2 ]; then
|
|
||||||
print -u2 "$PROG_NAME: $1 option missing value; exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
PRINT_ERRORS="$2"
|
|
||||||
shift 2 ;;
|
|
||||||
|
|
||||||
-h | "-?" | -help)
|
|
||||||
usage $PROG_NAME
|
|
||||||
do_exit 1 ;;
|
|
||||||
|
|
||||||
-l | -log_path )
|
|
||||||
if [ $# -lt 2 ]; then
|
|
||||||
print -u2 "$PROG_NAME: $1 option missing value; exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
LOG_PATH=$2
|
|
||||||
shift 2 ;;
|
|
||||||
|
|
||||||
-m | -mail | -mail_list)
|
|
||||||
if [ $# -lt 2 ]; then
|
|
||||||
print -u2 "$PROG_NAME: $1 option missing value; exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
MAIL_LIST=$2
|
|
||||||
shift 2 ;;
|
|
||||||
|
|
||||||
-pn | -project_name)
|
|
||||||
if [ $# -lt 2 ]; then
|
|
||||||
print -u2 "$PROG_NAME: $1 option missing value; exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
# Change the value of SUBJECT_BUILD_SUMMARY
|
|
||||||
SUBJECT_BUILD_SUMMARY="${2}: Build Summary"
|
|
||||||
shift 2 ;;
|
|
||||||
|
|
||||||
-s | -summary_file)
|
|
||||||
if [ $# -lt 2 ]; then
|
|
||||||
print -u2 "$PROG_NAME: $1 option missing value; exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
SUMMARY_FILES="$SUMMARY_FILES $2"
|
|
||||||
shift 2 ;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
print -u2 "$PROG_NAME: invalid option $1; exiting ..."
|
|
||||||
do_exit 1 ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
#############################################################################
|
|
||||||
#
|
|
||||||
# Check to make sure that the command-line parameters make sense.
|
|
||||||
#
|
|
||||||
for f in $COMPONENTS_FILES
|
|
||||||
do
|
|
||||||
if [ ! -f $f ]
|
|
||||||
then
|
|
||||||
print -u2 "$PROG_NAME: Component file \"$f\" does not exist."
|
|
||||||
print -u2 "$PROG_NAME: exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ -z "$SUMMARY_FILES" ]
|
|
||||||
then
|
|
||||||
print -u2 "$PROG_NAME: No report summaries specified; exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
#############################################################################
|
|
||||||
#
|
|
||||||
# Determine which builds never started or never completed.
|
|
||||||
#
|
|
||||||
NOT_AVAILABLE_SUMMARY_FILES=""
|
|
||||||
AVAILABLE_SUMMARY_FILES=""
|
|
||||||
for r in $SUMMARY_FILES
|
|
||||||
do
|
|
||||||
if [ ! -f $r ]; then
|
|
||||||
if [ -z "$NOT_AVAILABLE_SUMMARY_FILES" ]; then
|
|
||||||
NOT_AVAILABLE_SUMMARY_FILES="$r"
|
|
||||||
else
|
|
||||||
NOT_AVAILABLE_SUMMARY_FILES="$NOT_AVAILABLE_SUMMARY_FILES $r"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
if [ -z "$AVAILABLE_SUMMARY_FILES" ]; then
|
|
||||||
AVAILABLE_SUMMARY_FILES="$r"
|
|
||||||
else
|
|
||||||
AVAILABLE_SUMMARY_FILES="$AVAILABLE_SUMMARY_FILES $r"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
SUMMARY_FILES="$AVAILABLE_SUMMARY_FILES"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Redirect output
|
|
||||||
#
|
|
||||||
EXECUTIVE_SUMMARY_LOG=/tmp/$PROG_NAME.execsum.$$
|
|
||||||
if [ "$DEBUG" = "False" ]; then
|
|
||||||
do_register_temporary_file $EXECUTIVE_SUMMARY_LOG
|
|
||||||
touch $EXECUTIVE_SUMMARY_LOG
|
|
||||||
|
|
||||||
exec 9>&1
|
|
||||||
exec > $EXECUTIVE_SUMMARY_LOG
|
|
||||||
fi
|
|
||||||
|
|
||||||
#############################################################################
|
|
||||||
#
|
|
||||||
# Header information
|
|
||||||
#
|
|
||||||
|
|
||||||
DATE=`date "$BTAG_DFMT"`
|
|
||||||
print -u1 " BUILD SUMMARY FOR: $DATE"
|
|
||||||
print -u1 " +++++++++++++++++++++++++++++++++++++"
|
|
||||||
print -u1
|
|
||||||
|
|
||||||
for r in $NOT_AVAILABLE_SUMMARY_FILES
|
|
||||||
do
|
|
||||||
print -u1 "Missing build summary: $r\n"
|
|
||||||
done
|
|
||||||
|
|
||||||
print -u1
|
|
||||||
print_error_and_warning_summaries_by_project
|
|
||||||
print -u1
|
|
||||||
print_build_start_end
|
|
||||||
|
|
||||||
print -u1
|
|
||||||
print -u1
|
|
||||||
print -u1 " BUILD PARAMETERS"
|
|
||||||
print -u1 " ++++++++++++++++"
|
|
||||||
print -u1
|
|
||||||
print -u1
|
|
||||||
|
|
||||||
print_build_parameters
|
|
||||||
|
|
||||||
print -u1
|
|
||||||
print -u1
|
|
||||||
print -u1 " ERROR SUMMARIES BY COMPONENT"
|
|
||||||
print -u1 " ++++++++++++++++++++++++++++"
|
|
||||||
print -u1
|
|
||||||
print -u1
|
|
||||||
|
|
||||||
print_error_summaries_by_component
|
|
||||||
|
|
||||||
|
|
||||||
#############################################################################
|
|
||||||
#
|
|
||||||
# Find the per component errors.
|
|
||||||
#
|
|
||||||
if [ $PRINT_ERRORS -gt 0 ]; then
|
|
||||||
|
|
||||||
print -u1
|
|
||||||
print -u1
|
|
||||||
print -u1 " ERROR LISTINGS BY COMPONENT"
|
|
||||||
print -u1 " +++++++++++++++++++++++++++"
|
|
||||||
print -u1
|
|
||||||
print -u1
|
|
||||||
|
|
||||||
print_error_listings_by_component
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Complete the build summary and mail it, save it, or dump it to stdout
|
|
||||||
#
|
|
||||||
if [ "" != "$MAIL_LIST" ]; then
|
|
||||||
mailx -s "$SUBJECT_BUILD_SUMMARY (`date $SUBJECT_DATE`) [Report #${REPORT_NUM}]" "$MAIL_LIST" < $EXECUTIVE_SUMMARY_LOG
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "" != "$LOG_PATH" ]; then
|
|
||||||
cp $EXECUTIVE_SUMMARY_LOG $LOG_PATH
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$DEBUG" = "False" -a "" = "$MAIL_LIST" -a "" = "$LOG_PATH" ]; then
|
|
||||||
exec >&9
|
|
||||||
cat $EXECUTIVE_SUMMARY_LOG
|
|
||||||
fi
|
|
||||||
|
|
||||||
for r in $SUMMARY_FILES
|
|
||||||
do
|
|
||||||
is_complete_build $r
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
#
|
|
||||||
# Clean up temporary files and exit
|
|
||||||
#
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
#############################################################################
|
|
||||||
#
|
|
||||||
# Clean up temporary files and exit
|
|
||||||
#
|
|
||||||
do_exit 0
|
|
|
@ -1,124 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
#
|
|
||||||
# build_summary_cron
|
|
||||||
#
|
|
||||||
########################################################################
|
|
||||||
#set -x
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Script setup: THIS NEEDS TO BE FIRST
|
|
||||||
#
|
|
||||||
SCRIPTS_DIR="`dirname $0`"
|
|
||||||
PROG_NAME="`basename $0`"
|
|
||||||
if [ "" = "$SCRIPTS_DIR" ]; then
|
|
||||||
SCRIPTS_DIR=/project/dt/scripts
|
|
||||||
fi
|
|
||||||
if [ ! -f $SCRIPTS_DIR/script_setup.ksh ]; then
|
|
||||||
print -u2 "$PRG: File '$SCRIPTS_DIR/script_setup.ksh' NOT found!"
|
|
||||||
print -u2 "$PRG: Exiting ..."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
. $SCRIPTS_DIR/script_setup.ksh
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Script specific global variables
|
|
||||||
#
|
|
||||||
##########################################################################
|
|
||||||
##########################################################################
|
|
||||||
|
|
||||||
BUILD_SUMMARY_ARGS=""
|
|
||||||
DEBUG="False"
|
|
||||||
MAIL_LIST=""
|
|
||||||
let RETRIES=4
|
|
||||||
let SLEEP_SECONDS=3600
|
|
||||||
let REPORT_NUM=1
|
|
||||||
|
|
||||||
usage ()
|
|
||||||
{
|
|
||||||
cat <<eof
|
|
||||||
USAGE: $PROG_NAME
|
|
||||||
[-retries <#_retries>]
|
|
||||||
[-sleep <#_seconds>]
|
|
||||||
[-h | -? | -help]
|
|
||||||
# Print usage and exit
|
|
||||||
#
|
|
||||||
# '$PROG_NAME' calls 'build_summary' to construct the report.
|
|
||||||
#
|
|
||||||
# If 'build_summary' returns an error code indicating
|
|
||||||
# that some of the specified builds have not completed,
|
|
||||||
# '$PROG_NAME' will put itself to sleep for 3600 seconds
|
|
||||||
# before trying again up to a maximum of 4 times.
|
|
||||||
# The number of retries and the sleep time can be altered
|
|
||||||
# using the '-retries' and '-sleep' options.
|
|
||||||
#
|
|
||||||
# Any command-line options not recognized by '$PROG_NAME' are
|
|
||||||
# passed to 'build_summary'.
|
|
||||||
#
|
|
||||||
# Any output from 'build_summary' is passed to the users
|
|
||||||
# specified in the '-mail' option.
|
|
||||||
eof
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Do command-line processing
|
|
||||||
#
|
|
||||||
while [ $# -gt 0 ]; do
|
|
||||||
|
|
||||||
case $1 in
|
|
||||||
|
|
||||||
-debug)
|
|
||||||
DEBUG="True"
|
|
||||||
shift ;;
|
|
||||||
|
|
||||||
-h | -help | '-?')
|
|
||||||
usage $PROG_NAME
|
|
||||||
do_exit 1 ;;
|
|
||||||
|
|
||||||
-retries)
|
|
||||||
if [ $# -lt 2 ]; then
|
|
||||||
print -u2 "$PROG_NAME: $1 option missing value; exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
let RETRIES=$2
|
|
||||||
shift 2 ;;
|
|
||||||
|
|
||||||
-sleep)
|
|
||||||
if [ $# -lt 2 ]; then
|
|
||||||
print -u2 "$PROG_NAME: $1 option missing value; exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
let SLEEP_SECONDS=$2
|
|
||||||
shift 2 ;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
BUILD_SUMMARY_ARGS="$BUILD_SUMMARY_ARGS $1"
|
|
||||||
shift 1 ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
while [[ $RETRIES -ge 0 ]]
|
|
||||||
do
|
|
||||||
$BUILD_SUMMARY $BUILD_SUMMARY_ARGS
|
|
||||||
STATUS=$?
|
|
||||||
|
|
||||||
if [ $STATUS -eq 0 ]; then
|
|
||||||
#
|
|
||||||
# Clean up temporary files and exit
|
|
||||||
#
|
|
||||||
do_exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
let REPORT_NUM=REPORT_NUM+1
|
|
||||||
let RETRIES=RETRIES-1
|
|
||||||
if [[ $RETRIES -ge 0 ]]; then
|
|
||||||
sleep $SLEEP_SECONDS
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
#
|
|
||||||
# Clean up temporary files and exit
|
|
||||||
#
|
|
||||||
do_exit 1
|
|
|
@ -1,662 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
#
|
|
||||||
# build_world
|
|
||||||
#
|
|
||||||
########################################################################
|
|
||||||
# set -x
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Script setup: THIS NEEDS TO BE FIRST
|
|
||||||
#
|
|
||||||
SCRIPTS_DIR="`dirname $0`"
|
|
||||||
if [ "" = "$SCRIPTS_DIR" ]; then
|
|
||||||
SCRIPTS_DIR=/project/dt/scripts
|
|
||||||
fi
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Script specific global variables
|
|
||||||
#
|
|
||||||
##########################################################################
|
|
||||||
##########################################################################
|
|
||||||
PROJECT_NAME="dt"
|
|
||||||
BUILD_TYPE=""
|
|
||||||
LOG_DIR=""
|
|
||||||
MAIL_LIST=""
|
|
||||||
PRE_BUILD=""
|
|
||||||
POST_BUILD=""
|
|
||||||
TOP=""
|
|
||||||
PROG_NAME="$0"
|
|
||||||
LOG_DATE="`date +%h.%d,%H:%M:%S`"
|
|
||||||
TMP_LOG_DIR_BASE=/project/dt/logs/build #Need to define now for usage()
|
|
||||||
VIEW_TAG="`uname -s`:no_view_specified"
|
|
||||||
|
|
||||||
X_PROJECT=x11
|
|
||||||
MOTIF_PROJECT=motif
|
|
||||||
CDE_PROJECT=cde
|
|
||||||
CDEDOC_PROJECT=cdedoc
|
|
||||||
CDETEST_PROJECT=cde-test
|
|
||||||
BUILD=build
|
|
||||||
|
|
||||||
DO_X_BUILD="False"
|
|
||||||
DO_MOTIF_BUILD="False"
|
|
||||||
DO_CDE_BUILD="False"
|
|
||||||
DO_CDEDOC_BUILD="False"
|
|
||||||
DO_REDIRECT_IO="True"
|
|
||||||
DO_CDETEST_BUILD="False"
|
|
||||||
|
|
||||||
DO_DEBUG="False"
|
|
||||||
DO_NOT_BUILD="False"
|
|
||||||
DO_COMPONENT_LOGS="True"
|
|
||||||
DO_ERROR_FILES="True"
|
|
||||||
DO_WARNING_FILES="True"
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
|
|
||||||
usage ()
|
|
||||||
{
|
|
||||||
cat <<eof
|
|
||||||
USAGE: $1
|
|
||||||
[-e | -dev] # Default: build x11, motif and cde
|
|
||||||
[-x | -x11] # Build x11 only
|
|
||||||
[-m | -motif] # Build motif only
|
|
||||||
[-c | -cde] # Build cde only
|
|
||||||
[-d | -cdedoc] # Build cde docs only
|
|
||||||
[-t | -cdetest] # Build cde tests only
|
|
||||||
[-a | -all] # Build x11, motif, cde, cdedoc and cdetest
|
|
||||||
[-no_build] # Dont build anything
|
|
||||||
[-no_complogs] # Dont create .log files for components
|
|
||||||
[-no_errors] # Dont create .err files
|
|
||||||
[-no_ioredirect]# Dont redirect stdout/stderr to build.log
|
|
||||||
[-no_warnings] # Dont create .wrn files
|
|
||||||
[-rpt_summary]
|
|
||||||
# Only print information used by
|
|
||||||
# build_summary to stdout. Equivalent to
|
|
||||||
# -no_build -no_complogs -no_errors -no_warnings
|
|
||||||
[-clean] # Do a clean build; default is incremental
|
|
||||||
[-debug] # Debugging output
|
|
||||||
[-pre <script_name>]
|
|
||||||
# script_name is a program that is run before the
|
|
||||||
# build is run.
|
|
||||||
[-post <script_name>]
|
|
||||||
# script_name is a program that is run after the
|
|
||||||
# build is run.
|
|
||||||
[{-v | -view | -view_tag} <view_tag>]
|
|
||||||
# The ClearCase view should always be set before
|
|
||||||
# this script is run. This option should only
|
|
||||||
# be used on systems where ClearCase is not installed.
|
|
||||||
# The view tag will be used when constructing the
|
|
||||||
# log directory name.
|
|
||||||
[{-ld | -log_dir} <directory>]
|
|
||||||
# Specify an alternate log directory.
|
|
||||||
# Default: $TMP_LOG_DIR_BASE/<view_tag>/<date>/
|
|
||||||
# <date> is of the format '$LOG_DATE'
|
|
||||||
[{-sd | -script_dir} <directory>]
|
|
||||||
# Specify an alternate directory for required files.
|
|
||||||
# Default: $SCRIPTS_DIR/
|
|
||||||
[{-pn | -project_name} project_name]
|
|
||||||
# Specifies the project name used in the log dir.
|
|
||||||
# The default log dir is is /project/dt/...
|
|
||||||
# Use this option (-pn x11) for X11 only builds to
|
|
||||||
# get logs in /project/x11/...
|
|
||||||
[-top <dir_name>]
|
|
||||||
# Use this to over-ride the default TOP directory
|
|
||||||
# for a project. There is NO default.
|
|
||||||
[{-mail | mail_list} <user_names>]
|
|
||||||
[-h | -? | -help] # Print usage and exit
|
|
||||||
eof
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
|
|
||||||
while [ $# -gt 0 ]; do
|
|
||||||
case $1 in
|
|
||||||
-e | -dev) DO_X_BUILD="True"
|
|
||||||
DO_MOTIF_BUILD="True"
|
|
||||||
DO_CDE_BUILD="True"
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
-x | -x11) DO_X_BUILD="True"
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
-m | -motif) DO_MOTIF_BUILD="True"
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
-c | -cde) DO_CDE_BUILD="True"
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
-d | -cdedoc) DO_CDEDOC_BUILD="True"
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
-t | -cdetest) DO_CDETEST_BUILD="True";
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
-a | -all) DO_X_BUILD="True"
|
|
||||||
DO_MOTIF_BUILD="True"
|
|
||||||
DO_CDE_BUILD="True"
|
|
||||||
DO_CDEDOC_BUILD="True"
|
|
||||||
DO_CDETEST_BUILD="True"
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
-no_build) DO_NOT_BUILD="True"; shift 1 ;;
|
|
||||||
|
|
||||||
-no_complogs) DO_COMPONENT_LOGS="False"; shift 1 ;;
|
|
||||||
|
|
||||||
-no_errors) DO_ERROR_FILES="False"; shift 1 ;;
|
|
||||||
|
|
||||||
-no_ioredirect) DO_REDIRECT_IO="False"; shift 1 ;;
|
|
||||||
|
|
||||||
-no_warnings) DO_WARNING_FILES="False"; shift 1 ;;
|
|
||||||
|
|
||||||
-rpt_summary) DO_NOT_BUILD="True"
|
|
||||||
DO_COMPONENT_LOGS="False"
|
|
||||||
DO_ERROR_FILES="False"
|
|
||||||
DO_WARNING_FILES="False"
|
|
||||||
shift 1;;
|
|
||||||
|
|
||||||
-clean) BUILD_TYPE="clean"; shift 1 ;;
|
|
||||||
|
|
||||||
-debug) DO_DEBUG="True"
|
|
||||||
DO_REDIRECT_IO="False"; shift 1 ;;
|
|
||||||
|
|
||||||
-ld | -log_dir) LOG_DIR=$2; shift 2 ;;
|
|
||||||
|
|
||||||
-v | -view | -view_tag) VIEW_TAG=$2; shift 2 ;;
|
|
||||||
|
|
||||||
-sd | -script_dir) SCRIPTS_DIR=$2;
|
|
||||||
export SCRIPTS_DIR;
|
|
||||||
shift 2 ;;
|
|
||||||
|
|
||||||
-pre) PRE_BUILD=$2; shift 2 ;;
|
|
||||||
|
|
||||||
-post) POST_BUILD=$2; shift 2 ;;
|
|
||||||
|
|
||||||
-top) TOP=$2; shift 2 ;;
|
|
||||||
|
|
||||||
-pn | -project_name) PROJECT_NAME=$2; shift 2 ;;
|
|
||||||
|
|
||||||
-mail | -mail_list) MAIL_LIST=$2; shift 2 ;;
|
|
||||||
|
|
||||||
-h | "-?" | -help | *) usage $PROG_NAME;
|
|
||||||
exit 1;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Script setup: Do this after the command line parsing to pick up
|
|
||||||
# an alternate setting of SCRIPTS_DIR
|
|
||||||
#
|
|
||||||
if [ ! -f $SCRIPTS_DIR/script_setup.ksh ]; then
|
|
||||||
print -u2 "$PRG: File '$SCRIPTS_DIR/script_setup.ksh' NOT found!"
|
|
||||||
print -u2 "$PRG: Exiting ..."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
. $SCRIPTS_DIR/script_setup.ksh
|
|
||||||
|
|
||||||
do_check_file $BUILD_PROJECT -x "NOT found"
|
|
||||||
do_check_file $EXTRACT_LOG -x "NOT found"
|
|
||||||
do_check_file $EXTRACT_MSG -x "NOT found"
|
|
||||||
do_check_file $CDE_COMPONENTS -f "NOT found"
|
|
||||||
do_check_file $ERROR_MSGS -f "NOT found"
|
|
||||||
do_check_file $WARNING_MSGS -f "NOT found"
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Exit if $CLEAR_CASE_TOOL is installed and no view is set
|
|
||||||
#
|
|
||||||
if [ -x $CLEAR_CASE_TOOL ]; then
|
|
||||||
$CLEAR_CASE_TOOL pwv | grep 'Set view' | grep NONE > /dev/null
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
print -u2 "Exiting ... No ClearCase view is set!"
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
VIEW_TAG="`$CLEAR_CASE_TOOL pwv -short`"
|
|
||||||
else
|
|
||||||
#
|
|
||||||
# Some systems don't have $CLEAR_CASE_TOOL so we need to
|
|
||||||
# work around it. Just output a warning for now.
|
|
||||||
#
|
|
||||||
print -u2 "$PROG_NAME: Warning: '$CLEAR_CASE_TOOL' is NOT installed."
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# If no project was selected, then build the 'dev' projects
|
|
||||||
#
|
|
||||||
if [ "False" = $DO_X_BUILD -a "False" = $DO_MOTIF_BUILD -a "False" = $DO_CDE_BUILD -a "FALSE" = $DO_CDEDOC_BUILD -a "False" = $DO_CDETEST_BUILD ]; then
|
|
||||||
DO_X_BUILD="True"
|
|
||||||
DO_MOTIF_BUILD="True"
|
|
||||||
DO_CDE_BUILD="True"
|
|
||||||
fi
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# If $INITIALIZE_VIEW is present, run it
|
|
||||||
#
|
|
||||||
if [ -x $INITIALIZE_VIEW -a "$X_PROJECT" != "$PROJECT_NAME" ]; then
|
|
||||||
$INITIALIZE_VIEW > /dev/null 2>&1
|
|
||||||
fi
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Set the log dir and log file for the project logs
|
|
||||||
#
|
|
||||||
# Put all undirected stdout and stderr in a separate log file
|
|
||||||
#
|
|
||||||
if [ "" = "$LOG_DIR" ]; then
|
|
||||||
LOG_DIR=$LOG_DIR_BASE/$VIEW_TAG/$LOG_DATE
|
|
||||||
|
|
||||||
if [ -L $LOG_DIR_BASE/$VIEW_TAG/LATEST ]; then
|
|
||||||
rm $LOG_DIR_BASE/$VIEW_TAG/LATEST
|
|
||||||
fi
|
|
||||||
ln -s ./$LOG_DATE $LOG_DIR_BASE/$VIEW_TAG/LATEST
|
|
||||||
fi
|
|
||||||
SUMM_FILE=$LOG_DIR/build.summary
|
|
||||||
if [ ! -d $LOG_DIR ]; then
|
|
||||||
mkdir -p $LOG_DIR
|
|
||||||
chmod 775 $LOG_DIR
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "True" = "$DO_REDIRECT_IO" ]; then
|
|
||||||
BUILD_LOG=$LOG_DIR/$BUILD.log
|
|
||||||
BUILD_LOG_REDIRECT="-e $BUILD_LOG"
|
|
||||||
rm -f $BUILD_LOG && touch $BUILD_LOG
|
|
||||||
exec >> $BUILD_LOG
|
|
||||||
exec 2>> $BUILD_LOG
|
|
||||||
else
|
|
||||||
BUILD_LOG_REDIRECT=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Build a project
|
|
||||||
#
|
|
||||||
do_build ()
|
|
||||||
{
|
|
||||||
#
|
|
||||||
# $1 = the project name
|
|
||||||
# $2 = [optional] command line options for $BUILD_PROJECT
|
|
||||||
# $3 = [optional] value for command line option $2
|
|
||||||
#
|
|
||||||
|
|
||||||
print -u1 "building in $1..."
|
|
||||||
|
|
||||||
DATE=`date +"$BTAG_DFMT"`
|
|
||||||
|
|
||||||
if [ "True" = $DO_NOT_BUILD ]; then
|
|
||||||
print -u1 "$BTAG_STRT $1: $DATE" >> $SUMM_FILE
|
|
||||||
print -u1 "$BTAG_PRJT = $1" >> $SUMM_FILE
|
|
||||||
print -u1 "$BTAG_ENDD $1: $DATE" >> $SUMM_FILE
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# if building cde tests, write to cde-test-summary.log and
|
|
||||||
# not cde-test.log since cde-test.log will be created by the
|
|
||||||
# test-build program.
|
|
||||||
#
|
|
||||||
if [ "$CDETEST_PROJECT" = "$1" ]; then
|
|
||||||
LOG_FILE=$LOG_DIR/$1-summary.log
|
|
||||||
else
|
|
||||||
LOG_FILE=$LOG_DIR/$1.log
|
|
||||||
fi
|
|
||||||
|
|
||||||
print -u1 "$BTAG_STRT $1: $DATE" >> $SUMM_FILE
|
|
||||||
print -u1 "$BTAG_PRJT = $1" >> $SUMM_FILE
|
|
||||||
print -u1 "$BTAG_LOGF = $LOG_FILE" >> $SUMM_FILE
|
|
||||||
|
|
||||||
print -u1 "$BTAG_STRT $1: $DATE" > $LOG_FILE
|
|
||||||
print -u1 "$BTAG_PRJT = $1" >> $LOG_FILE
|
|
||||||
print -u1 "$BTAG_LOGF = $LOG_FILE" >> $LOG_FILE
|
|
||||||
|
|
||||||
print -u1 "$BTAG_SYST = `uname -a`" >> $LOG_FILE
|
|
||||||
print -u1 "$BTAG_VIEW = $VIEW_TAG" >> $LOG_FILE
|
|
||||||
if [ "" = "$BUILD_TYPE" ]; then
|
|
||||||
print -u1 "$BTAG_TYPE = incrmt" >> $LOG_FILE
|
|
||||||
else
|
|
||||||
print -u1 "$BTAG_TYPE = $BUILD_TYPE" >> $LOG_FILE
|
|
||||||
fi
|
|
||||||
if [ -x $CLEAR_CASE_TOOL ]; then
|
|
||||||
$CLEAR_CASE_TOOL catcs >> $LOG_FILE
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "" != "$PRE_BUILD" -a -x "$PRE_BUILD" ]; then
|
|
||||||
print -u1 "Running pre-build script '$PRE_BUILD'." >> $LOG_FILE
|
|
||||||
$PRE_BUILD >> $LOG_FILE 2>&1
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
print -u2 "\nThe pre_build script '$PRE_BUILD' failed."
|
|
||||||
print -u2 "Aborting the build!\n"
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "" = "$2" ]; then
|
|
||||||
if [ "" = "$BUILD_TYPE" ]; then
|
|
||||||
if [ "" = "$TOP" ]; then
|
|
||||||
$BUILD_PROJECT -p $1 >> $LOG_FILE 2>&1
|
|
||||||
else
|
|
||||||
$BUILD_PROJECT -top "$TOP" -p $1 >> $LOG_FILE 2>&1
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
if [ "" = "$TOP" ]; then
|
|
||||||
$BUILD_PROJECT -p $1 -"$BUILD_TYPE" >> $LOG_FILE 2>&1
|
|
||||||
else
|
|
||||||
$BUILD_PROJECT -top "$TOP" -p $1 -"$BUILD_TYPE" >> $LOG_FILE 2>&1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
if [ "" = "$BUILD_TYPE" ]; then
|
|
||||||
if [ "" = "$TOP" ]; then
|
|
||||||
$BUILD_PROJECT -p $1 "$2" "$3" >> $LOG_FILE 2>&1
|
|
||||||
else
|
|
||||||
$BUILD_PROJECT -top "$TOP" -p $1 "$2" "$3" >> $LOG_FILE 2>&1
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
if [ "" = "$TOP" ]; then
|
|
||||||
$BUILD_PROJECT -p $1 -"$BUILD_TYPE" "$2" "$3" >> $LOG_FILE 2>&1
|
|
||||||
else
|
|
||||||
$BUILD_PROJECT -top "$TOP" -p $1 -"$BUILD_TYPE" "$2" "$3" >> $LOG_FILE 2>&1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "" != "$POST_BUILD" -a -x "$POST_BUILD" ]; then
|
|
||||||
print -u1 "Running post-build script '$POST_BUILD'." >> $LOG_FILE
|
|
||||||
$POST_BUILD >> $LOG_FILE 2>&1
|
|
||||||
fi
|
|
||||||
|
|
||||||
DATE=`date +"$BTAG_DFMT"`
|
|
||||||
|
|
||||||
print -u1 "$BTAG_ENDD $1: $DATE" >> $LOG_FILE
|
|
||||||
print -u1 "$BTAG_ENDD $1: $DATE\n" >> $SUMM_FILE
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# do_summary -
|
|
||||||
#
|
|
||||||
do_summary ()
|
|
||||||
{
|
|
||||||
#
|
|
||||||
# $1 = the project name
|
|
||||||
# $2 = the log file
|
|
||||||
#
|
|
||||||
PROJECT=$1
|
|
||||||
LOG_FILE=$2$3
|
|
||||||
ERR_FILE=$2$4
|
|
||||||
WRN_FILE=$2$5
|
|
||||||
|
|
||||||
print -u1 extracting errors and warnings in $PROJECT...
|
|
||||||
|
|
||||||
ERR=`$EXTRACT_MSG \
|
|
||||||
-m $ERROR_MSGS \
|
|
||||||
-i $WARNING_MSGS -i $IGNORE_MSGS \
|
|
||||||
-l $LOG_FILE $BUILD_LOG_REDIRECT | wc -l`
|
|
||||||
WARN=`$EXTRACT_MSG \
|
|
||||||
-m $WARNING_MSGS \
|
|
||||||
-l $LOG_FILE $BUILD_LOG_REDIRECT | wc -l`
|
|
||||||
|
|
||||||
if [ "True" = $DO_ERROR_FILES ]; then
|
|
||||||
$EXTRACT_MSG \
|
|
||||||
-m $ERROR_MSGS -m $BUILD_MSGS \
|
|
||||||
-i $WARNING_MSGS -i $IGNORE_MSGS \
|
|
||||||
-l $LOG_FILE $BUILD_LOG_REDIRECT | \
|
|
||||||
$COMPRESS_MSG \
|
|
||||||
-m $BUILD_MSGS $BUILD_LOG_REDIRECT > $ERR_FILE
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "True" = $DO_WARNING_FILES ]; then
|
|
||||||
$EXTRACT_MSG \
|
|
||||||
-m $WARNING_MSGS -m $BUILD_MSGS \
|
|
||||||
-l $LOG_FILE $BUILD_LOG_REDIRECT | \
|
|
||||||
$COMPRESS_MSG \
|
|
||||||
-m $BUILD_MSGS $BUILD_LOG_REDIRECT > $WRN_FILE
|
|
||||||
fi
|
|
||||||
|
|
||||||
AWK_PROJECT='{printf("%-32s %5s errors %5s warnings",$1,$2,$3)}'
|
|
||||||
echo $PROJECT $ERR $WARN | awk "$AWK_PROJECT" >> $SUMM_FILE
|
|
||||||
print -u1 >> $SUMM_FILE
|
|
||||||
|
|
||||||
if [ "True" = "$DO_DEBUG" ]; then
|
|
||||||
echo $PROJECT $ERR $WARN | awk "$AWK_PROJECT"
|
|
||||||
print -u1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# do_component_summary
|
|
||||||
#
|
|
||||||
do_component_summary ()
|
|
||||||
{
|
|
||||||
#
|
|
||||||
# $1 = the project name
|
|
||||||
# $2 = the project log file
|
|
||||||
# $3 = the components file
|
|
||||||
#
|
|
||||||
PROJECT=$1
|
|
||||||
PROJECT_LOG_FILE=$2
|
|
||||||
COMPONENTS_FILE=$3
|
|
||||||
COMPONENTS_LOG_DIR=$LOG_DIR/$PROJECT
|
|
||||||
|
|
||||||
typeset -i TTL_ERR
|
|
||||||
typeset -i TTL_WARN
|
|
||||||
|
|
||||||
AWK_COMPONENT='{printf(" %-32s %5s errors %5s warnings",$1,$2,$3)}'
|
|
||||||
|
|
||||||
#
|
|
||||||
# Separate the log file for the project into log files for the
|
|
||||||
# individual components. Put them into a subdirectory since
|
|
||||||
# there may be alot of them.
|
|
||||||
#
|
|
||||||
if [ "$DO_COMPONENT_LOGS" = "True" ]; then
|
|
||||||
if [ ! -d $COMPONENTS_LOG_DIR ]; then
|
|
||||||
mkdir -p $COMPONENTS_LOG_DIR
|
|
||||||
chmod 775 $COMPONENTS_LOG_DIR
|
|
||||||
fi
|
|
||||||
|
|
||||||
$EXTRACT_LOG \
|
|
||||||
-l $PROJECT_LOG_FILE \
|
|
||||||
-c $COMPONENTS_FILE \
|
|
||||||
-ld $COMPONENTS_LOG_DIR $BUILD_LOG_REDIRECT
|
|
||||||
fi
|
|
||||||
|
|
||||||
let TTL_ERR=0
|
|
||||||
let TTL_WARN=0
|
|
||||||
|
|
||||||
for COMPONENT in `cat $COMPONENTS_FILE`
|
|
||||||
do
|
|
||||||
print -u1 extracting errors and warnings in $PROJECT/$COMPONENT...
|
|
||||||
|
|
||||||
COMPONENT_FILE_BASE=`echo $COMPONENT | tr "/" ","`
|
|
||||||
COMPONENT_LOG_FILE=$COMPONENTS_LOG_DIR/$COMPONENT_FILE_BASE.log
|
|
||||||
|
|
||||||
if [ ! -f $COMPONENT_LOG_FILE ]; then
|
|
||||||
print -u2 $PROG_NAME: Error, $COMPONENT_LOG_FILE not found.
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
ERR=`$EXTRACT_MSG \
|
|
||||||
-m $ERROR_MSGS \
|
|
||||||
-i $WARNING_MSGS -i $IGNORE_MSGS \
|
|
||||||
-l $COMPONENT_LOG_FILE $BUILD_LOG_REDIRECT | wc -l`
|
|
||||||
WARN=`$EXTRACT_MSG \
|
|
||||||
-m $WARNING_MSGS \
|
|
||||||
-l $COMPONENT_LOG_FILE $BUILD_LOG_REDIRECT | wc -l`
|
|
||||||
|
|
||||||
let TTL_ERR=TTL_ERR+ERR
|
|
||||||
let TTL_WARN=TTL_WARN+WARN
|
|
||||||
|
|
||||||
if [ $ERR -ne 0 -o $WARN -ne 0 ]; then
|
|
||||||
echo $PROJECT/$COMPONENT $ERR $WARN | \
|
|
||||||
awk "$AWK_COMPONENT" >> $SUMM_FILE
|
|
||||||
print -u1 >> $SUMM_FILE
|
|
||||||
|
|
||||||
if [ "True" = $DO_ERROR_FILES -a $ERR -gt 0 ]; then
|
|
||||||
COMPONENT_ERR_FILE=$COMPONENTS_LOG_DIR/$COMPONENT_FILE_BASE.err
|
|
||||||
$EXTRACT_MSG \
|
|
||||||
-m $ERROR_MSGS -m $BUILD_MSGS \
|
|
||||||
-i $WARNING_MSGS -i $IGNORE_MSGS \
|
|
||||||
-l $COMPONENT_LOG_FILE $BUILD_LOG_REDIRECT | \
|
|
||||||
$COMPRESS_MSG \
|
|
||||||
-m $BUILD_MSGS $BUILD_LOG_REDIRECT > $COMPONENT_ERR_FILE
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "True" = $DO_WARNING_FILES -a $WARN -gt 0 ]; then
|
|
||||||
COMPONENT_WRN_FILE=$COMPONENTS_LOG_DIR/$COMPONENT_FILE_BASE.wrn
|
|
||||||
$EXTRACT_MSG \
|
|
||||||
-m $WARNING_MSGS -m $BUILD_MSGS \
|
|
||||||
-l $COMPONENT_LOG_FILE $BUILD_LOG_REDIRECT | \
|
|
||||||
$COMPRESS_MSG \
|
|
||||||
-m $BUILD_MSGS $BUILD_LOG_REDIRECT > $COMPONENT_WRN_FILE
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "True" = "$DO_DEBUG" ]; then
|
|
||||||
echo $PROJECT/$COMPONENT $ERR $WARN | awk "$AWK_COMPONENT"
|
|
||||||
print -u1
|
|
||||||
|
|
||||||
echo TOTAL $TTL_ERR $TTL_WARN | awk "$AWK_COMPONENT"
|
|
||||||
print -u1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
echo $PROJECT-TOTAL $TTL_ERR $TTL_WARN | awk "$AWK_COMPONENT" >> $SUMM_FILE
|
|
||||||
print -u1 >> $SUMM_FILE
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Print header stuff needed for build_summary
|
|
||||||
#
|
|
||||||
DATE=`date +"$BTAG_DFMT"`
|
|
||||||
print -u1 "###################################################" >> $SUMM_FILE
|
|
||||||
print -u1 "$BTAG_DATE = $DATE" >> $SUMM_FILE
|
|
||||||
print -u1 "$BTAG_VIEW = $VIEW_TAG" >> $SUMM_FILE
|
|
||||||
if [ -x $CLEAR_CASE_TOOL ]; then
|
|
||||||
TMP_FILE_NAME=`$CLEAR_CASE_TOOL catcs | head -1 | awk '{printf "%s\n", $3}'`
|
|
||||||
if [ -f "$TMP_FILE_NAME" ]; then
|
|
||||||
print -u1 "$BTAG_CFGS = `$CLEAR_CASE_TOOL catcs | head -1 | awk '{printf "%s\n", $3}'`" >> $SUMM_FILE
|
|
||||||
else
|
|
||||||
print -u1 "$BTAG_CFGS = NoSpecFile" >> $SUMM_FILE
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
print -u1 "$BTAG_CFGS = NoClrCase" >> $SUMM_FILE
|
|
||||||
fi
|
|
||||||
print -u1 "$BTAG_PTFM = `uname -s`" >> $SUMM_FILE
|
|
||||||
print -u1 "$BTAG_LOGD = $LOG_DIR" >> $SUMM_FILE
|
|
||||||
if [ "" = "$BUILD_TYPE" ]; then
|
|
||||||
print -u1 "$BTAG_TYPE = incrmt" >> $SUMM_FILE
|
|
||||||
else
|
|
||||||
print -u1 "$BTAG_TYPE = $BUILD_TYPE" >> $SUMM_FILE
|
|
||||||
fi
|
|
||||||
print -u1 "###################################################\n" >> $SUMM_FILE
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Do the builds and Summarize the results
|
|
||||||
#
|
|
||||||
|
|
||||||
if [ "True" = $DO_X_BUILD ]; then
|
|
||||||
print -u1 "#############################################" >> $SUMM_FILE
|
|
||||||
do_build $X_PROJECT "" ""
|
|
||||||
do_summary $X_PROJECT $LOG_DIR/$X_PROJECT .log .err .wrn
|
|
||||||
do_component_summary \
|
|
||||||
$X_PROJECT \
|
|
||||||
$LOG_DIR/$X_PROJECT.log \
|
|
||||||
$X_COMPONENTS
|
|
||||||
print -u1 "#############################################\n" >> $SUMM_FILE
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "True" = $DO_MOTIF_BUILD ]; then
|
|
||||||
print -u1 "#############################################" >> $SUMM_FILE
|
|
||||||
do_build $MOTIF_PROJECT "" ""
|
|
||||||
do_summary $MOTIF_PROJECT $LOG_DIR/$MOTIF_PROJECT .log .err .wrn
|
|
||||||
do_component_summary \
|
|
||||||
$MOTIF_PROJECT \
|
|
||||||
$LOG_DIR/$MOTIF_PROJECT.log \
|
|
||||||
$MOTIF_COMPONENTS
|
|
||||||
print -u1 "#############################################\n" >> $SUMM_FILE
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "True" = $DO_CDE_BUILD ]; then
|
|
||||||
print -u1 "#############################################" >> $SUMM_FILE
|
|
||||||
do_build $CDE_PROJECT "" ""
|
|
||||||
do_summary $CDE_PROJECT $LOG_DIR/$CDE_PROJECT .log .err .wrn
|
|
||||||
do_component_summary \
|
|
||||||
$CDE_PROJECT \
|
|
||||||
$LOG_DIR/$CDE_PROJECT.log \
|
|
||||||
$CDE_COMPONENTS
|
|
||||||
print -u1 "#############################################\n" >> $SUMM_FILE
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "True" = $DO_CDEDOC_BUILD ]; then
|
|
||||||
print -u1 "#############################################" >> $SUMM_FILE
|
|
||||||
do_build $CDEDOC_PROJECT "" ""
|
|
||||||
do_summary $CDEDOC_PROJECT $LOG_DIR/$CDEDOC_PROJECT .log .err .wrn
|
|
||||||
do_component_summary \
|
|
||||||
$CDEDOC_PROJECT \
|
|
||||||
$LOG_DIR/$CDEDOC_PROJECT.log \
|
|
||||||
$CDEDOC_COMPONENTS
|
|
||||||
print -u1 "#############################################\n" >> $SUMM_FILE
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "True" = "$DO_CDETEST_BUILD" ]; then
|
|
||||||
print -u1 "#############################################" >> $SUMM_FILE
|
|
||||||
do_build $CDETEST_PROJECT "-log_dir" "$LOG_DIR"
|
|
||||||
if [ -f $LOG_DIR/$CDETEST_PROJECT/allmake.* ]; then
|
|
||||||
ln -s $LOG_DIR/$CDETEST_PROJECT/allmake.* $LOG_DIR/$CDETEST_PROJECT.log
|
|
||||||
fi
|
|
||||||
do_summary $CDETEST_PROJECT $LOG_DIR/$CDETEST_PROJECT .log .err .wrn
|
|
||||||
do_component_summary \
|
|
||||||
$CDETEST_PROJECT \
|
|
||||||
$LOG_DIR/$CDETEST_PROJECT.log \
|
|
||||||
$CDETEST_COMPONENTS
|
|
||||||
print -u1 "#############################################\n" >> $SUMM_FILE
|
|
||||||
fi
|
|
||||||
|
|
||||||
#print -u1 "###################################################\n" >> $SUMM_FILE
|
|
||||||
#do_summary $BUILD $LOG_DIR/$BUILD.log
|
|
||||||
#print -u1 "###################################################\n" >> $SUMM_FILE
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Complete the build summary with the config spec and the $BTAG_CMPL
|
|
||||||
#
|
|
||||||
print -u1 "###################################################\n" >> $SUMM_FILE
|
|
||||||
if [ -x $CLEAR_CASE_TOOL ]; then
|
|
||||||
$CLEAR_CASE_TOOL catcs >> $SUMM_FILE
|
|
||||||
fi
|
|
||||||
print -u1 "###################################################\n" >> $SUMM_FILE
|
|
||||||
|
|
||||||
DATE=`date +"$BTAG_DFMT"`
|
|
||||||
print -u1 "###################################################\n" >> $SUMM_FILE
|
|
||||||
print -u1 "$BTAG_CMPL: $DATE\n" >> $SUMM_FILE
|
|
||||||
print -u1 "###################################################\n" >> $SUMM_FILE
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Complete the build summary and mail it or dump it to stdout
|
|
||||||
#
|
|
||||||
if [ "" != "$MAIL_LIST" ]; then
|
|
||||||
mailx -s "$SUBJECT_BUILD_COMPLETE - $VIEW_TAG (`date $SUBJECT_DATE`)" "$MAIL_LIST" < $SUMM_FILE
|
|
||||||
else
|
|
||||||
cat $SUMM_FILE
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# Clean up temporary files and exit
|
|
||||||
#
|
|
||||||
do_exit 0
|
|
|
@ -1,348 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
#
|
|
||||||
# cc_checkedout
|
|
||||||
#
|
|
||||||
########################################################################
|
|
||||||
# set -x
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Script setup: THIS NEEDS TO BE FIRST
|
|
||||||
#
|
|
||||||
SCRIPTS_DIR="`dirname $0`"
|
|
||||||
PROG_NAME="`basename $0`"
|
|
||||||
if [ "" = "$SCRIPTS_DIR" ]; then
|
|
||||||
SCRIPTS_DIR=/project/dt/scripts
|
|
||||||
fi
|
|
||||||
if [ ! -f $SCRIPTS_DIR/script_setup.ksh ]; then
|
|
||||||
print -u2 "$PROG_NAME: File '$SCRIPTS_DIR/script_setup.ksh' NOT found!"
|
|
||||||
print -u2 "$PROG_NAME: Exiting ..."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
. $SCRIPTS_DIR/script_setup.ksh
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Script specific global variables
|
|
||||||
#
|
|
||||||
COMPONENTS_FILES=""
|
|
||||||
COMPONENTS=""
|
|
||||||
DEBUG="False"
|
|
||||||
DO_DELETE="True"
|
|
||||||
DO_LISTING="True"
|
|
||||||
DO_SUMMARY="True"
|
|
||||||
DO_TMPFILE="True"
|
|
||||||
HAVE_EVENTS="True"
|
|
||||||
CHECKEDOUT_LOG=""
|
|
||||||
LOG_PATH=""
|
|
||||||
MAIL_LIST=""
|
|
||||||
PROG_NAME="`basename $0`"
|
|
||||||
WHAT_TO_SEARCH="-avobs"
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# FUNCTION: do_executive_summary ()
|
|
||||||
#
|
|
||||||
do_executive_summary ()
|
|
||||||
{
|
|
||||||
AWK_EXEC_CO_SUMMARY='{printf("%-40s [CheckedOut= %-3s; Users= ", $1,$2)}'
|
|
||||||
AWK_EXEC_USER_SUMMARY='{printf("%s ", $1)}'
|
|
||||||
AWK_EXEC_TERM_SUMMARY='{printf("]\n")}'
|
|
||||||
COMPONENT=$1
|
|
||||||
|
|
||||||
if [ "True" = "$DEBUG" ]; then
|
|
||||||
print -u2 "summarizing events in $COMPONENT"
|
|
||||||
fi
|
|
||||||
TOTAL_CHECKEDOUT=`$EXTRACT_MSG -l $CHECKEDOUT_LOG $COMPONENT | wc -l |
|
|
||||||
awk '{printf("%s",$1)}'`
|
|
||||||
|
|
||||||
if [ $TOTAL_CHECKEDOUT -ne 0 ]; then
|
|
||||||
USERS=`$EXTRACT_MSG -l $CHECKEDOUT_LOG $COMPONENT |
|
|
||||||
awk '{ print $1 }' FS="::" | sort | uniq`
|
|
||||||
|
|
||||||
echo "$COMPONENT $TOTAL_CHECKEDOUT" | awk "$AWK_EXEC_CO_SUMMARY"
|
|
||||||
for u in $USERS
|
|
||||||
do
|
|
||||||
echo "$u" | awk "$AWK_EXEC_USER_SUMMARY"
|
|
||||||
done
|
|
||||||
echo "" | awk "$AWK_EXEC_TERM_SUMMARY"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# FUNCTION: usage ()
|
|
||||||
#
|
|
||||||
usage ()
|
|
||||||
{
|
|
||||||
cat <<eof
|
|
||||||
USAGE: $PROG_NAME
|
|
||||||
[-d | -debug] # Print output to stdout
|
|
||||||
[-h | -? | -help] # Print usage and exit
|
|
||||||
[{-l | -log_path} <file>] # Specifies the output file for the report.
|
|
||||||
[{-m | -mail | -mail_list} <user_name(s)>]
|
|
||||||
[{-t | -tmpfile} <file>] # Specifies the tmp file to be extracted from.
|
|
||||||
[{-w | -what | -what_to_search} <option or directory>]
|
|
||||||
# The default is: $WHAT_TO_SEARCH
|
|
||||||
[-no_delete]
|
|
||||||
[-no_listing]
|
|
||||||
[-no_summary]
|
|
||||||
|
|
||||||
# '$PROG_NAME' calls clearcase commands to determine which files
|
|
||||||
# are currently checked out and then delivers the report. The
|
|
||||||
# report can be sent to a list of mail recipients, or a log file
|
|
||||||
# or both. If neither is specified, the report is sent to stdout
|
|
||||||
# by default.
|
|
||||||
eof
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
######################################################################
|
|
||||||
#
|
|
||||||
# Exit if no view is set
|
|
||||||
#
|
|
||||||
$CLEAR_CASE_TOOL pwv | grep 'Set view' | grep NONE > /dev/null
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
print -u2 "$PROG_NAME: Exiting ... NO ClearCase view is set!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Do command-line processing
|
|
||||||
#
|
|
||||||
while [ $# -gt 0 ]; do
|
|
||||||
case $1 in
|
|
||||||
|
|
||||||
-debug)
|
|
||||||
DEBUG="True"
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
-h | -? | -help)
|
|
||||||
usage $PROG_NAME
|
|
||||||
do_exit 1 ;;
|
|
||||||
|
|
||||||
-l | -log_path)
|
|
||||||
if [ $# -lt 2 ]; then
|
|
||||||
print -u2 "$PROG_NAME: $1 option missing value; exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
LOG_PATH=$2
|
|
||||||
shift 2 ;;
|
|
||||||
|
|
||||||
-m | -mail | -mail_list)
|
|
||||||
if [ $# -lt 2 ]; then
|
|
||||||
print -u2 "$PROG_NAME: $1 option missing value; exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
MAIL_LIST=$2
|
|
||||||
shift 2 ;;
|
|
||||||
|
|
||||||
-t | -tmpfile)
|
|
||||||
if [ $# -lt 2 ]; then
|
|
||||||
print -u2 "$PROG_NAME: $1 option missing value; exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
DO_TMPFILE="false"
|
|
||||||
CHECKEDOUT_LOG=$2
|
|
||||||
shift 2 ;;
|
|
||||||
|
|
||||||
-w | -what | -what_to_search)
|
|
||||||
if [ $# -lt 2 ]; then
|
|
||||||
print -u2 "$PROG_NAME: $1 option missing value; exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
WHAT_TO_SEARCH=$2
|
|
||||||
shift 2 ;;
|
|
||||||
|
|
||||||
-no_listing)
|
|
||||||
DO_LISTING="False"
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
-no_summary)
|
|
||||||
DO_SUMMARY="False"
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
-no_delete)
|
|
||||||
DO_DELETE="False"
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
usage $PROG_NAME
|
|
||||||
do_exit 1 ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
if [ "True" = "$DO_TMPFILE" ]; then
|
|
||||||
CHECKEDOUT_LOG=/tmp/$PROG_NAME.checkedout.$$
|
|
||||||
CHECKEDOUT_LOG_PRIME=/tmp/$PROG_NAME.checkedout.1.$$
|
|
||||||
do_register_temporary_file $CHECKEDOUT_LOG
|
|
||||||
do_register_temporary_file $CHECKEDOUT_LOG_PRIME
|
|
||||||
|
|
||||||
#
|
|
||||||
# First get the list of files
|
|
||||||
#
|
|
||||||
$CLEAR_CASE_TOOL lsco -fmt "%u %n %f\n" $WHAT_TO_SEARCH > $CHECKEDOUT_LOG
|
|
||||||
|
|
||||||
#
|
|
||||||
# Since it is possible for more than one person to have a
|
|
||||||
# file checked-out must get all locks. Note that it also
|
|
||||||
# desireable to get each user's comments attached to the
|
|
||||||
# checkout.
|
|
||||||
#
|
|
||||||
cat $CHECKEDOUT_LOG | while read LINE; do
|
|
||||||
FILE="`echo $LINE | awk '{printf "%s", $2}'`"
|
|
||||||
$CLEAR_CASE_TOOL lsco -d -fmt "%u::%Ad::days::%Tf::(%Rf)::%n::%f\n" \
|
|
||||||
$FILE >> $CHECKEDOUT_LOG_PRIME
|
|
||||||
done
|
|
||||||
|
|
||||||
#
|
|
||||||
# Sort the files and remove dups.
|
|
||||||
#
|
|
||||||
sort $CHECKEDOUT_LOG_PRIME | uniq > $CHECKEDOUT_LOG
|
|
||||||
cp $CHECKEDOUT_LOG $CHECKEDOUT_LOG_PRIME
|
|
||||||
|
|
||||||
sed -e 's/\.cde-1/cde/
|
|
||||||
s/\.cde-2/cde/
|
|
||||||
s/\.cde-3/cde/
|
|
||||||
s/\.cde-test-1/cde-test/
|
|
||||||
s/\.cde-test-2/cde-test/
|
|
||||||
s/\.cde-test-3/cde-test/
|
|
||||||
s/\.motif-1/motif/
|
|
||||||
s/\.motif-2/motif/' $CHECKEDOUT_LOG_PRIME > $CHECKEDOUT_LOG
|
|
||||||
fi
|
|
||||||
|
|
||||||
PROJECTS="cde cde-contrib cde-cts cde-misc cde-test cde-test-misc
|
|
||||||
motif motif-cts motif-misc x11/misc x11/unsupported x11"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Redirect output
|
|
||||||
#
|
|
||||||
if [ "$DEBUG" = "False" ]; then
|
|
||||||
EXECUTIVE_SUMMARY_LOG=/tmp/$PROG_NAME.execsum.$$
|
|
||||||
do_register_temporary_file $EXECUTIVE_SUMMARY_LOG
|
|
||||||
touch $EXECUTIVE_SUMMARY_LOG
|
|
||||||
|
|
||||||
exec 9>&1
|
|
||||||
exec > $EXECUTIVE_SUMMARY_LOG
|
|
||||||
fi
|
|
||||||
|
|
||||||
DATE=`date "$BTAG_DFMT"`
|
|
||||||
print -u1 " CLEARCASE CHECKEDOUT SUMMARY FOR: $DATE"
|
|
||||||
print -u1 " ++++++++++++++++++++++++++++++++++++++++++++++++++++"
|
|
||||||
print -u1
|
|
||||||
print -u1
|
|
||||||
|
|
||||||
if [ ! -s $CHECKEDOUT_LOG ]; then
|
|
||||||
if [ "$DEBUG" = "True" ]; then
|
|
||||||
print -u1 "Log file '$CHECKEDOUT_LOG' is empty"
|
|
||||||
fi
|
|
||||||
HAVE_EVENTS="False"
|
|
||||||
print -u1 "NO events were found."
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
if [ "True" = "$DO_SUMMARY" -a "True" = "$HAVE_EVENTS" ]; then
|
|
||||||
|
|
||||||
for p in $PROJECTS
|
|
||||||
do
|
|
||||||
COMPONENTS_FILE=$SCRIPTS_DIR/$p.components
|
|
||||||
if [ -f $COMPONENTS_FILE ]; then
|
|
||||||
#
|
|
||||||
# Correct for the missing 'xc' subdirectory in x11.components
|
|
||||||
#
|
|
||||||
if [ "$p" = "x11" ]; then
|
|
||||||
p=x11/xc
|
|
||||||
fi
|
|
||||||
|
|
||||||
for c in `cat $COMPONENTS_FILE`
|
|
||||||
do
|
|
||||||
do_executive_summary /proj/$p/$c
|
|
||||||
done
|
|
||||||
else
|
|
||||||
do_executive_summary /proj/$p
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "True" = "$DO_LISTING" -a "True" = "$HAVE_EVENTS" ]; then
|
|
||||||
print -u1
|
|
||||||
print -u1
|
|
||||||
print -u1 " CLEARCASE CHECKEDOUT LISTING"
|
|
||||||
print -u1 " ++++++++++++++++++++++++++++"
|
|
||||||
print -u1
|
|
||||||
print -u1
|
|
||||||
|
|
||||||
cat $CHECKEDOUT_LOG | while read LINE; do
|
|
||||||
|
|
||||||
USER="`echo $LINE | awk '{FS="::"; printf "%s", $1}'`"
|
|
||||||
FILE="`echo $LINE | awk '{FS="::"; printf "%s", $6}'`"
|
|
||||||
|
|
||||||
echo $LINE | \
|
|
||||||
sed '/::1::days/s//::1:: day/' | \
|
|
||||||
sed '/\(unreserved\)/s//U/' | \
|
|
||||||
sed '/\(reserved\)/s//R/' | \
|
|
||||||
awk '{ FS="::"; printf "%-8s %3d %s %s %s\n %s@@%s\n", $1,$2,$3,$4,$5,$6,$7 }'
|
|
||||||
|
|
||||||
#
|
|
||||||
# Attach the WIP if present
|
|
||||||
#
|
|
||||||
WIP="`$CLEAR_CASE_TOOL lsco -d -user $USER -fmt '%[WIP]a' $FILE`"
|
|
||||||
if [ "" != "$WIP" ]; then
|
|
||||||
print -u1 " $WIP"
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# Attach the (possibly mult-line) comment
|
|
||||||
#
|
|
||||||
$CLEAR_CASE_TOOL lsco -d -user $USER -fmt "%c" $FILE \
|
|
||||||
| awk '{printf " %s\n", $0}'
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
#####################################################################
|
|
||||||
#
|
|
||||||
# If no files were found, create a descriptive message; else
|
|
||||||
# tack on a legend
|
|
||||||
#
|
|
||||||
if [ ! -s $CHECKEDOUT_LOG ]; then
|
|
||||||
print -u1 "NO files are checked out!"
|
|
||||||
else
|
|
||||||
mv $CHECKEDOUT_LOG_PRIME $CHECKEDOUT_LOG
|
|
||||||
print -u1 "\n(R) = reserved checkout"
|
|
||||||
print -u1 "(U) = unreseved checkout"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Complete the build summary and deliver it
|
|
||||||
#
|
|
||||||
if [ "" != "$MAIL_LIST" ]; then
|
|
||||||
mailx -s "$SUBJECT_CHECKOUTS (`date $SUBJECT_DATE`)" "$MAIL_LIST" < \
|
|
||||||
$EXECUTIVE_SUMMARY_LOG
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "" != "$LOG_PATH" ]; then
|
|
||||||
cp $EXECUTIVE_SUMMARY_LOG $LOG_PATH
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$DEBUG" = "False" -a "" = "$MAIL_LIST" -a "" = "$LOG_PATH" ]; then
|
|
||||||
exec >&9
|
|
||||||
cat $EXECUTIVE_SUMMARY_LOG
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Clean up temporary files and exit
|
|
||||||
#
|
|
||||||
if [ "True" = "$DO_DELETE" ]; then
|
|
||||||
do_exit 0
|
|
||||||
fi
|
|
||||||
exit 0
|
|
|
@ -1,334 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
#
|
|
||||||
# cc_submissions
|
|
||||||
#
|
|
||||||
########################################################################
|
|
||||||
# set -x
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Script setup: THIS NEEDS TO BE FIRST
|
|
||||||
#
|
|
||||||
SCRIPTS_DIR="`dirname $0`"
|
|
||||||
PROG_NAME="`basename $0`"
|
|
||||||
if [ "" = "$SCRIPTS_DIR" ]; then
|
|
||||||
SCRIPTS_DIR=/project/dt/scripts
|
|
||||||
fi
|
|
||||||
if [ ! -f $SCRIPTS_DIR/script_setup.ksh ]; then
|
|
||||||
print -u2 "$PRG: File '$SCRIPTS_DIR/script_setup.ksh' NOT found!"
|
|
||||||
print -u2 "$PRG: Exiting ..."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
. $SCRIPTS_DIR/script_setup.ksh
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Script specific global variables
|
|
||||||
#
|
|
||||||
COMPONENTS_FILES=""
|
|
||||||
COMPONENTS=""
|
|
||||||
DEBUG="False"
|
|
||||||
DO_DELETE="True"
|
|
||||||
DO_LISTING="True"
|
|
||||||
DO_TMPFILE="True"
|
|
||||||
DO_SUMMARY="True"
|
|
||||||
INCLUDE_ROOT="False"
|
|
||||||
SUBMISSION_LOG=""
|
|
||||||
MAIL_LIST=""
|
|
||||||
NULLSUBDIRECTORY="__XXX__"
|
|
||||||
HAVE_EVENTS="True"
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# FUNCTION: do_executive_summary ()
|
|
||||||
#
|
|
||||||
do_executive_summary ()
|
|
||||||
{
|
|
||||||
AWK_EXEC_EVENT_SUMMARY='{printf("%-40s [Events= %-3s; Users= ", $1,$2)}'
|
|
||||||
AWK_EXEC_USER_SUMMARY='{printf("%s ", $1)}'
|
|
||||||
AWK_EXEC_TERM_SUMMARY='{printf("]\n")}'
|
|
||||||
COMPONENT=$1
|
|
||||||
|
|
||||||
if [ "True" = "$DEBUG" ]; then
|
|
||||||
print -u2 "summarizing events in $COMPONENT"
|
|
||||||
fi
|
|
||||||
TOTAL_EVENTS=`$EXTRACT_MSG -l $SUBMISSION_LOG $COMPONENT | wc -l |
|
|
||||||
awk '{printf("%s",$1)}'`
|
|
||||||
|
|
||||||
if [ $TOTAL_EVENTS -ne 0 ]; then
|
|
||||||
USERS=`$EXTRACT_MSG -l $SUBMISSION_LOG $COMPONENT |
|
|
||||||
awk '{ print $3 }' FS="|" | sort | uniq`
|
|
||||||
|
|
||||||
# for u in $USERS
|
|
||||||
# do
|
|
||||||
# USER_EVENTS=`$EXTRACT_MSG -l $SUBMISSION_LOG $COMPONENT |
|
|
||||||
# grep "$FS$u$FS" | wc -l`
|
|
||||||
# echo "$u $USER_EVENTS" | awk "$AWK_EXEC_SUMMARY"
|
|
||||||
# done
|
|
||||||
echo "$COMPONENT $TOTAL_EVENTS" | awk "$AWK_EXEC_EVENT_SUMMARY"
|
|
||||||
for u in $USERS
|
|
||||||
do
|
|
||||||
echo "$u" | awk "$AWK_EXEC_USER_SUMMARY"
|
|
||||||
done
|
|
||||||
echo "" | awk "$AWK_EXEC_TERM_SUMMARY"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# FUNCTION: do_listing_summary ()
|
|
||||||
#
|
|
||||||
do_listing_summary ()
|
|
||||||
{
|
|
||||||
AWK_LIST_SUMMARY='{printf("%s\n User=%-12s Event=%-16s DDTS=%8s \n Comment='%s'\n",$2,$3,$4,$5,$7)}'
|
|
||||||
COMPONENT=$1
|
|
||||||
|
|
||||||
if [ "True" = "$DEBUG" ]; then
|
|
||||||
print -u2 "listing events in $COMPONENT"
|
|
||||||
fi
|
|
||||||
TOTAL_EVENTS=`$EXTRACT_MSG -l $SUBMISSION_LOG $COMPONENT | wc -l`
|
|
||||||
|
|
||||||
if [ $TOTAL_EVENTS -ne 0 ]; then
|
|
||||||
print -u1 "+"
|
|
||||||
print -u1 "+ Events In: $COMPONENT"
|
|
||||||
print -u1 "+"
|
|
||||||
|
|
||||||
$EXTRACT_MSG -l $SUBMISSION_LOG $COMPONENT | \
|
|
||||||
awk "$AWK_LIST_SUMMARY" FS="|"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# FUNCTION: usage ()
|
|
||||||
#
|
|
||||||
usage ()
|
|
||||||
{
|
|
||||||
cat <<eof
|
|
||||||
USAGE: $1
|
|
||||||
[-h | -? | -help] # Print usage and exit
|
|
||||||
[{-m | -mail | -mail_list} <user_name(s)>]
|
|
||||||
[{-t | -tmpfile} <file>] # Specifies the log file to be extracted from.
|
|
||||||
[-include_root]
|
|
||||||
[-no_delete]
|
|
||||||
[-no_listing]
|
|
||||||
[-no_summary]
|
|
||||||
|
|
||||||
# '$PROG_NAME' calls clearcase commands to determine which files
|
|
||||||
# were submitted in the last 24 hours and then delivers the report.
|
|
||||||
# The report can be sent to a list of mail recipients, or a log file
|
|
||||||
# or both. If neither is specified, the report is sent to stdout
|
|
||||||
# by default.
|
|
||||||
eof
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Do command-line processing
|
|
||||||
#
|
|
||||||
while [ $# -gt 0 ]; do
|
|
||||||
case $1 in
|
|
||||||
|
|
||||||
-debug)
|
|
||||||
DEBUG="True"
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
-h | -? | -help)
|
|
||||||
usage $PROG_NAME
|
|
||||||
do_exit 1 ;;
|
|
||||||
|
|
||||||
-l | -log_path)
|
|
||||||
if [ $# -lt 2 ]; then
|
|
||||||
print -u2 "$PROG_NAME: $1 option missing value; exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
LOG_PATH=$2
|
|
||||||
shift 2 ;;
|
|
||||||
|
|
||||||
-m | -mail | -mail_list)
|
|
||||||
if [ $# -lt 2 ]; then
|
|
||||||
print -u2 "$PROG_NAME: $1 option missing value; exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
MAIL_LIST=$2
|
|
||||||
shift 2 ;;
|
|
||||||
|
|
||||||
-t | -tmpfile)
|
|
||||||
if [ $# -lt 2 ]; then
|
|
||||||
print -u2 "$PROG_NAME: $1 option missing value; exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
DO_TMPFILE="false"
|
|
||||||
SUBMISSION_LOG=$2
|
|
||||||
shift 2 ;;
|
|
||||||
|
|
||||||
-include_root)
|
|
||||||
INCLUDE_ROOT="True"
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
-no_listing)
|
|
||||||
DO_LISTING="False"
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
-no_summary)
|
|
||||||
DO_SUMMARY="False"
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
-no_delete)
|
|
||||||
DO_DELETE="False"
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
usage $PROG_NAME
|
|
||||||
do_exit 1 ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
if [ "True" = "$DO_TMPFILE" ]; then
|
|
||||||
SUBMISSION_LOG=/tmp/$PROG_NAME.lshistory.$$
|
|
||||||
SUBMISSION_LOG_PRIME=/tmp/$PROG_NAME.lshistory.1.$$
|
|
||||||
do_register_temporary_file $SUBMISSION_LOG
|
|
||||||
do_register_temporary_file $SUBMISSION_LOG_PRIME
|
|
||||||
|
|
||||||
EVENT="EVENT"
|
|
||||||
FS='|'
|
|
||||||
FORMAT="$EVENT$FS%n$FS%u$FS%e$FS%1.FIXESa$FS%1.l$FS%1.Nc$FS\n"
|
|
||||||
|
|
||||||
$CLEAR_CASE_TOOL lshistory -fmt $FORMAT \
|
|
||||||
-avobs -nco -since yesterday.00:00 > $SUBMISSION_LOG
|
|
||||||
|
|
||||||
#
|
|
||||||
# Delete entries submitted by root
|
|
||||||
#
|
|
||||||
grep $EVENT $SUBMISSION_LOG | sort > $SUBMISSION_LOG_PRIME
|
|
||||||
|
|
||||||
if [ "False" = $INCLUDE_ROOT ]; then
|
|
||||||
SUBMISSION_LOG_TWO=/tmp/$PROG_NAME.lshistory.2.$$
|
|
||||||
do_register_temporary_file $SUBMISSION_LOG_TWO
|
|
||||||
|
|
||||||
egrep -v -e "${FS}root$FS" $SUBMISSION_LOG_PRIME > $SUBMISSION_LOG_TWO
|
|
||||||
cp $SUBMISSION_LOG_TWO $SUBMISSION_LOG_PRIME
|
|
||||||
fi
|
|
||||||
|
|
||||||
sed -e 's/\.cde-1/cde/
|
|
||||||
s/\.cde-2/cde/
|
|
||||||
s/\.cde-3/cde/
|
|
||||||
s/\.cde-test-1/cde-test/
|
|
||||||
s/\.cde-test-2/cde-test/
|
|
||||||
s/\.cde-test-3/cde-test/
|
|
||||||
s/\.motif-1/motif/
|
|
||||||
s/\.motif-2/motif/' $SUBMISSION_LOG_PRIME > $SUBMISSION_LOG
|
|
||||||
fi
|
|
||||||
|
|
||||||
PROJECTS="cde cde-contrib cde-cts cde-misc cde-test cde-test-misc
|
|
||||||
motif motif-cts motif-misc x11/misc x11/unsupported x11"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Redirect output
|
|
||||||
#
|
|
||||||
if [ "$DEBUG" = "False" ]; then
|
|
||||||
EXECUTIVE_SUMMARY_LOG=/tmp/$PROG_NAME.execsum.$$
|
|
||||||
do_register_temporary_file $EXECUTIVE_SUMMARY_LOG
|
|
||||||
touch $EXECUTIVE_SUMMARY_LOG
|
|
||||||
|
|
||||||
exec 9>&1
|
|
||||||
exec > $EXECUTIVE_SUMMARY_LOG
|
|
||||||
fi
|
|
||||||
|
|
||||||
DATE=`date "$BTAG_DFMT"`
|
|
||||||
print -u1 " CLEARCASE EVENT SUMMARY FOR: $DATE"
|
|
||||||
print -u1 " +++++++++++++++++++++++++++++++++++++++++++++++"
|
|
||||||
print -u1
|
|
||||||
print -u1
|
|
||||||
|
|
||||||
if [ ! -s $SUBMISSION_LOG ]; then
|
|
||||||
HAVE_EVENTS="False"
|
|
||||||
print -u1 "NO events were found."
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
if [ "True" = "$DO_SUMMARY" -a "True" = "$HAVE_EVENTS" ]; then
|
|
||||||
|
|
||||||
for p in $PROJECTS
|
|
||||||
do
|
|
||||||
COMPONENTS_FILE=$SCRIPTS_DIR/$p.components
|
|
||||||
if [ -f $COMPONENTS_FILE ]; then
|
|
||||||
#
|
|
||||||
# Correct for the missing 'xc' subdirectory in x11.components
|
|
||||||
#
|
|
||||||
if [ "$p" = "x11" ]; then
|
|
||||||
p=x11/xc
|
|
||||||
fi
|
|
||||||
|
|
||||||
for c in `cat $COMPONENTS_FILE`
|
|
||||||
do
|
|
||||||
do_executive_summary /proj/$p/$c
|
|
||||||
done
|
|
||||||
else
|
|
||||||
do_executive_summary /proj/$p
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "True" = "$DO_LISTING" -a "True" = "$HAVE_EVENTS" ]; then
|
|
||||||
print -u1
|
|
||||||
print -u1
|
|
||||||
print -u1 " CLEARCASE EVENT LISTING"
|
|
||||||
print -u1 " +++++++++++++++++++++++"
|
|
||||||
print -u1
|
|
||||||
print -u1
|
|
||||||
|
|
||||||
for p in $PROJECTS
|
|
||||||
do
|
|
||||||
COMPONENTS_FILE=$SCRIPTS_DIR/$p.components
|
|
||||||
if [ -f $COMPONENTS_FILE ]; then
|
|
||||||
#
|
|
||||||
# Correct for the missing 'xc' subdirectory in x11.components
|
|
||||||
#
|
|
||||||
if [ "$p" = "x11" ]; then
|
|
||||||
p=x11/xc
|
|
||||||
fi
|
|
||||||
|
|
||||||
for c in `cat $COMPONENTS_FILE`
|
|
||||||
do
|
|
||||||
do_listing_summary /proj/$p/$c
|
|
||||||
done
|
|
||||||
else
|
|
||||||
do_listing_summary /proj/$p
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Complete the build summary and mail it or dump it to stdout
|
|
||||||
#
|
|
||||||
if [ "" != "$MAIL_LIST" ]; then
|
|
||||||
mailx -s "$SUBJECT_SUBMISSIONS (`date $SUBJECT_DATE`)" "$MAIL_LIST" < \
|
|
||||||
$EXECUTIVE_SUMMARY_LOG
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "" != "$LOG_PATH" ]; then
|
|
||||||
cp $EXECUTIVE_SUMMARY_LOG $LOG_PATH
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$DEBUG" = "False" -a "" = "$MAIL_LIST" -a "" = "$LOG_PATH" ]; then
|
|
||||||
exec >&9
|
|
||||||
cat $EXECUTIVE_SUMMARY_LOG
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Clean up temporary files and exit
|
|
||||||
#
|
|
||||||
if [ "True" = "$DO_DELETE" ]; then
|
|
||||||
do_exit 0
|
|
||||||
fi
|
|
||||||
exit 0
|
|
|
@ -1,59 +0,0 @@
|
||||||
admin
|
|
||||||
config
|
|
||||||
databases
|
|
||||||
lib/DtHelp
|
|
||||||
lib/DtMmdb
|
|
||||||
lib/DtMrm
|
|
||||||
lib/DtPrint
|
|
||||||
lib/DtSearch
|
|
||||||
lib/DtSvc
|
|
||||||
lib/DtTerm
|
|
||||||
lib/DtWidget
|
|
||||||
lib/cs
|
|
||||||
lib/pam
|
|
||||||
lib/tt
|
|
||||||
osf/bindings
|
|
||||||
osf/uil
|
|
||||||
osf/wml
|
|
||||||
osf/xmbind
|
|
||||||
programs/doc
|
|
||||||
programs/dsdm
|
|
||||||
programs/dtaction
|
|
||||||
programs/dtappbuilder
|
|
||||||
programs/dtappintegrate
|
|
||||||
programs/dtcalc
|
|
||||||
programs/dtcm
|
|
||||||
programs/dtconfig
|
|
||||||
programs/dtcreate
|
|
||||||
programs/dtdbcache
|
|
||||||
programs/dtdocbook
|
|
||||||
programs/dtdspmsg
|
|
||||||
programs/dtexec
|
|
||||||
programs/dtfile
|
|
||||||
programs/dthello
|
|
||||||
programs/dthelp
|
|
||||||
programs/dticon
|
|
||||||
programs/dtimsstart
|
|
||||||
programs/dtinfo
|
|
||||||
programs/dtksh
|
|
||||||
programs/dtlogin
|
|
||||||
programs/dtmail
|
|
||||||
programs/dtpad
|
|
||||||
programs/dtpdm
|
|
||||||
programs/dtpdmd
|
|
||||||
programs/dtprintegrate
|
|
||||||
programs/dtprintinfo
|
|
||||||
programs/dtscreen
|
|
||||||
programs/dtsearchpath
|
|
||||||
programs/dtsession
|
|
||||||
programs/dtspcd
|
|
||||||
programs/dtsr
|
|
||||||
programs/dtstyle
|
|
||||||
programs/dtterm
|
|
||||||
programs/dtudcexch
|
|
||||||
programs/dtudcfonted
|
|
||||||
programs/dtwm
|
|
||||||
programs/localized
|
|
||||||
programs/nsgmls
|
|
||||||
programs/ttsnoop
|
|
||||||
programs/tttypes
|
|
|
@ -1,237 +0,0 @@
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# File: cron_database
|
|
||||||
#
|
|
||||||
##########################################################################
|
|
||||||
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# This is a build database file used by the cron_scripts script to start
|
|
||||||
# the various build and report scripts from crontab. cron_scripts is intended
|
|
||||||
# to provide a level of indirection which allows the nightly builds to be
|
|
||||||
# controlled without having to edit crontab entries.
|
|
||||||
#
|
|
||||||
# To set up an automated build on a particular machine you will need to
|
|
||||||
# do the following:
|
|
||||||
#
|
|
||||||
# 1. Checkout /proj/cde/admin/BuildTools/tog/cron_database.
|
|
||||||
# Edit it as specified in the section explaining the database format.
|
|
||||||
# Check it back in when satisfied with the entries.
|
|
||||||
# Copy it to /project/dt/admin/cron
|
|
||||||
#
|
|
||||||
# 2. Log onto the desired machine as 'devobj' and add the following line
|
|
||||||
# to the crontab entries:
|
|
||||||
#
|
|
||||||
# 15 * * * * /project/dt/scripts/cron_scripts
|
|
||||||
#
|
|
||||||
# The crontab entry will cause cron_scripts to run every hour at 15 minutes
|
|
||||||
# past the hour. The script checks the database to see if there is a valid
|
|
||||||
# entry for the MachineName, FullWeekdayName, and 24HourClockHour. If
|
|
||||||
# such an entry does NOT exists, cron_scripts simply exits. Otherwise,
|
|
||||||
# if the view is not set to 'none' it sets the view and exectutes the
|
|
||||||
# specified command line. If the view is set to 'none' it just executes
|
|
||||||
# the specified command line.
|
|
||||||
#
|
|
||||||
|
|
||||||
#
|
|
||||||
# Format:
|
|
||||||
#
|
|
||||||
# FullWeekdayName (aka `date +%A`)
|
|
||||||
# 24HourClockHour (aka `date +%H`)
|
|
||||||
# MachineName
|
|
||||||
# View
|
|
||||||
# CommandLine
|
|
||||||
#
|
|
||||||
# NOTE:
|
|
||||||
# Comment Character = '#'
|
|
||||||
# Line Continuation Character = '\'
|
|
||||||
#
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# CDE Cron Jobs
|
|
||||||
#
|
|
||||||
##########################################################################
|
|
||||||
|
|
||||||
#
|
|
||||||
# Monday
|
|
||||||
#
|
|
||||||
Monday 02 build-hp cde-hp \
|
|
||||||
/project/dt/scripts/build_id \
|
|
||||||
-dev -log_path /project/dt/ID/cdeID
|
|
||||||
Monday 03 build-hp cde-hp \
|
|
||||||
/project/dt/scripts/build_id \
|
|
||||||
-cdetest -log_path /project/dt/ID/cde-testID
|
|
||||||
|
|
||||||
Monday 05 hans none \
|
|
||||||
/project/dt/scripts/make_report_dir
|
|
||||||
-log_path /project/dt/logs/build/reports/LATEST
|
|
||||||
Monday 06 hans cde-sun \
|
|
||||||
/project/dt/scripts/cc_checkedout \
|
|
||||||
-log_path /project/dt/logs/build/reports/LATEST/checkedout
|
|
||||||
Monday 06 hans cde-sun \
|
|
||||||
/project/dt/scripts/cc_submissions \
|
|
||||||
-log_path /project/dt/logs/build/reports/LATEST/submitted
|
|
||||||
Monday 07 hans none \
|
|
||||||
/project/dt/scripts/build_summary_cron \
|
|
||||||
-retries 3 \
|
|
||||||
-c /project/dt/scripts/x11.components \
|
|
||||||
-c /project/dt/scripts/motif.components \
|
|
||||||
-c /project/dt/scripts/cde.components \
|
|
||||||
-c /project/dt/scripts/cdedoc.components \
|
|
||||||
-c /project/dt/scripts/cdetest.components \
|
|
||||||
-s /project/dt/logs/build/cde-hp/LATEST/build.summary \
|
|
||||||
-s /project/dt/logs/build/cde-sun/LATEST/build.summary \
|
|
||||||
-log_path /project/dt/logs/build/reports/LATEST/build.summary
|
|
||||||
|
|
||||||
Monday 19 build-hp cde-hp \
|
|
||||||
/project/dt/scripts/build_world -dev -cdetest
|
|
||||||
Monday 19 hans cde-sun \
|
|
||||||
/project/dt/scripts/build_world -dev -cdetest
|
|
||||||
|
|
||||||
#
|
|
||||||
# Tuesday
|
|
||||||
#
|
|
||||||
Tuesday 02 build-hp cde-hp \
|
|
||||||
/project/dt/scripts/build_id \
|
|
||||||
-dev -log_path /project/dt/ID/cdeID
|
|
||||||
Tuesday 03 build-hp cde-hp \
|
|
||||||
/project/dt/scripts/build_id \
|
|
||||||
-cdetest -log_path /project/dt/ID/cde-testID
|
|
||||||
|
|
||||||
Tuesday 05 hans none \
|
|
||||||
/project/dt/scripts/make_report_dir
|
|
||||||
-log_path /project/dt/logs/build/reports/LATEST
|
|
||||||
Tuesday 06 hans cde-sun \
|
|
||||||
/project/dt/scripts/cc_checkedout \
|
|
||||||
-log_path /project/dt/logs/build/reports/LATEST/checkedout
|
|
||||||
Tuesday 06 hans cde-sun \
|
|
||||||
/project/dt/scripts/cc_submissions \
|
|
||||||
-log_path /project/dt/logs/build/reports/LATEST/submitted
|
|
||||||
Tuesday 07 hans none \
|
|
||||||
/project/dt/scripts/build_summary_cron \
|
|
||||||
-retries 3 \
|
|
||||||
-c /project/dt/scripts/x11.components \
|
|
||||||
-c /project/dt/scripts/motif.components \
|
|
||||||
-c /project/dt/scripts/cde.components \
|
|
||||||
-c /project/dt/scripts/cdedoc.components \
|
|
||||||
-c /project/dt/scripts/cdetest.components \
|
|
||||||
-s /project/dt/logs/build/cde-hp/LATEST/build.summary \
|
|
||||||
-s /project/dt/logs/build/cde-sun/LATEST/build.summary \
|
|
||||||
-log_path /project/dt/logs/build/reports/LATEST/build.summary
|
|
||||||
|
|
||||||
Tuesday 19 build-hp cde-hp \
|
|
||||||
/project/dt/scripts/build_world -dev -cdetest
|
|
||||||
Tuesday 19 hans cde-sun \
|
|
||||||
/project/dt/scripts/build_world -dev -cdetest
|
|
||||||
|
|
||||||
#
|
|
||||||
# Wednesday
|
|
||||||
#
|
|
||||||
Wednesday 02 build-hp cde-hp \
|
|
||||||
/project/dt/scripts/build_id \
|
|
||||||
-dev -log_path /project/dt/ID/cdeID
|
|
||||||
Wednesday 03 build-hp cde-hp \
|
|
||||||
/project/dt/scripts/build_id \
|
|
||||||
-cdetest -log_path /project/dt/ID/cde-testID
|
|
||||||
|
|
||||||
Wednesday 05 hans none \
|
|
||||||
/project/dt/scripts/make_report_dir
|
|
||||||
-log_path /project/dt/logs/build/reports/LATEST
|
|
||||||
Wednesday 06 hans cde-sun \
|
|
||||||
/project/dt/scripts/cc_checkedout \
|
|
||||||
-log_path /project/dt/logs/build/reports/LATEST/checkedout
|
|
||||||
Wednesday 06 hans cde-sun \
|
|
||||||
/project/dt/scripts/cc_submissions \
|
|
||||||
-log_path /project/dt/logs/build/reports/LATEST/submitted
|
|
||||||
Wednesday 07 hans none \
|
|
||||||
/project/dt/scripts/build_summary_cron \
|
|
||||||
-retries 3 \
|
|
||||||
-c /project/dt/scripts/x11.components \
|
|
||||||
-c /project/dt/scripts/motif.components \
|
|
||||||
-c /project/dt/scripts/cde.components \
|
|
||||||
-c /project/dt/scripts/cdedoc.components \
|
|
||||||
-c /project/dt/scripts/cdetest.components \
|
|
||||||
-s /project/dt/logs/build/cde-hp/LATEST/build.summary \
|
|
||||||
-s /project/dt/logs/build/cde-sun/LATEST/build.summary \
|
|
||||||
-log_path /project/dt/logs/build/reports/LATEST/build.summary
|
|
||||||
|
|
||||||
Wednesday 19 build-hp cde-hp \
|
|
||||||
/project/dt/scripts/build_world -dev -cdetest
|
|
||||||
Wednesday 19 hans cde-sun \
|
|
||||||
/project/dt/scripts/build_world -dev -cdetest
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# Thursday
|
|
||||||
#
|
|
||||||
Thursday 02 build-hp cde-hp \
|
|
||||||
/project/dt/scripts/build_id \
|
|
||||||
-dev -log_path /project/dt/ID/cdeID
|
|
||||||
Thursday 03 build-hp cde-hp \
|
|
||||||
/project/dt/scripts/build_id \
|
|
||||||
-cdetest -log_path /project/dt/ID/cde-testID
|
|
||||||
|
|
||||||
Thursday 05 hans none \
|
|
||||||
/project/dt/scripts/make_report_dir
|
|
||||||
-log_path /project/dt/logs/build/reports/LATEST
|
|
||||||
Thursday 06 hans cde-sun \
|
|
||||||
/project/dt/scripts/cc_checkedout \
|
|
||||||
-log_path /project/dt/logs/build/reports/LATEST/checkedout
|
|
||||||
Thursday 06 hans cde-sun \
|
|
||||||
/project/dt/scripts/cc_submissions \
|
|
||||||
-log_path /project/dt/logs/build/reports/LATEST/submitted
|
|
||||||
Thursday 07 hans none \
|
|
||||||
/project/dt/scripts/build_summary_cron \
|
|
||||||
-retries 3 \
|
|
||||||
-c /project/dt/scripts/x11.components \
|
|
||||||
-c /project/dt/scripts/motif.components \
|
|
||||||
-c /project/dt/scripts/cde.components \
|
|
||||||
-c /project/dt/scripts/cdedoc.components \
|
|
||||||
-c /project/dt/scripts/cdetest.components \
|
|
||||||
-s /project/dt/logs/build/cde-hp/LATEST/build.summary \
|
|
||||||
-s /project/dt/logs/build/cde-sun/LATEST/build.summary \
|
|
||||||
-log_path /project/dt/logs/build/reports/LATEST/build.summary
|
|
||||||
|
|
||||||
Thursday 19 build-hp cde-hp \
|
|
||||||
/project/dt/scripts/build_world -dev -cdetest
|
|
||||||
Thursday 19 hans cde-sun \
|
|
||||||
/project/dt/scripts/build_world -dev -cdetest
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# Friday
|
|
||||||
#
|
|
||||||
Friday 02 build-hp cde-hp \
|
|
||||||
/project/dt/scripts/build_id \
|
|
||||||
-dev -log_path /project/dt/ID/cdeID
|
|
||||||
Friday 03 build-hp cde-hp \
|
|
||||||
/project/dt/scripts/build_id \
|
|
||||||
-cdetest -log_path /project/dt/ID/cde-testID
|
|
||||||
|
|
||||||
Friday 05 hans none \
|
|
||||||
/project/dt/scripts/make_report_dir
|
|
||||||
-log_path /project/dt/logs/build/reports/LATEST
|
|
||||||
Friday 06 hans cde-sun \
|
|
||||||
/project/dt/scripts/cc_checkedout \
|
|
||||||
-log_path /project/dt/logs/build/reports/LATEST/checkedout
|
|
||||||
Friday 06 hans cde-sun \
|
|
||||||
/project/dt/scripts/cc_submissions \
|
|
||||||
-log_path /project/dt/logs/build/reports/LATEST/submitted
|
|
||||||
Friday 07 hans none \
|
|
||||||
/project/dt/scripts/build_summary_cron \
|
|
||||||
-retries 3 \
|
|
||||||
-c /project/dt/scripts/x11.components \
|
|
||||||
-c /project/dt/scripts/motif.components \
|
|
||||||
-c /project/dt/scripts/cde.components \
|
|
||||||
-c /project/dt/scripts/cdedoc.components \
|
|
||||||
-c /project/dt/scripts/cdetest.components \
|
|
||||||
-s /project/dt/logs/build/cde-hp/LATEST/build.summary \
|
|
||||||
-s /project/dt/logs/build/cde-sun/LATEST/build.summary \
|
|
||||||
-log_path /project/dt/logs/build/reports/LATEST/build.summary
|
|
||||||
|
|
||||||
Friday 16 build-hp cde-hp \
|
|
||||||
/project/dt/scripts/build_world -clean -all
|
|
||||||
Friday 16 hans cde-sun \
|
|
||||||
/project/dt/scripts/build_world -clean -all
|
|
|
@ -1,5 +0,0 @@
|
||||||
###############################################################################
|
|
||||||
#
|
|
||||||
# Builds and reports
|
|
||||||
#
|
|
||||||
15 * * * * /project/dt/scripts/cron_scripts -db /project/dt/admin/cron/cde.crondb
|
|
|
@ -1,9 +0,0 @@
|
||||||
doc/common
|
|
||||||
doc/de_DE.ISO8859-1
|
|
||||||
doc/es_ES.ISO8859-1
|
|
||||||
doc/fr_FR.ISO8859-1
|
|
||||||
doc/it_IT.ISO8859-1
|
|
||||||
doc/ja_JP.dt-eucJP
|
|
||||||
doc/C
|
|
||||||
doc/tmp
|
|
||||||
doc/util
|
|
|
@ -1,54 +0,0 @@
|
||||||
config
|
|
||||||
util
|
|
||||||
tet
|
|
||||||
src
|
|
||||||
comp_suites/XmMT
|
|
||||||
comp_suites/threadsafe
|
|
||||||
comp_suites/DefConfig
|
|
||||||
comp_suites/DtEditor
|
|
||||||
comp_suites/DtSvc
|
|
||||||
comp_suites/dtaction
|
|
||||||
comp_suites/dtcm
|
|
||||||
comp_suites/dtcalc
|
|
||||||
comp_suites/dtfile
|
|
||||||
comp_suites/dthelp
|
|
||||||
comp_suites/dtpad
|
|
||||||
comp_suites/dtspcd
|
|
||||||
comp_suites/dtterm
|
|
||||||
comp_suites/dtwm
|
|
||||||
comp_suites/dtfp
|
|
||||||
comp_suites/DtWidget
|
|
||||||
comp_suites/dsdm
|
|
||||||
comp_suites/dtstyle
|
|
||||||
comp_suites/dtmail
|
|
||||||
comp_suites/dtksh
|
|
||||||
comp_suites/dtsearchpath
|
|
||||||
comp_suites/dtappgather
|
|
||||||
comp_suites/dtappintegrate
|
|
||||||
comp_suites/dtlp
|
|
||||||
comp_suites/dtscreen
|
|
||||||
comp_suites/dtsession
|
|
||||||
comp_suites/DevEnv
|
|
||||||
comp_suites/examples
|
|
||||||
comp_suites/synlib
|
|
||||||
comp_suites/dtbuilder
|
|
||||||
comp_suites/dtlogin
|
|
||||||
comp_suites/vert-writing
|
|
||||||
comp_suites/tt
|
|
||||||
comp_suites/dtperf
|
|
||||||
comp_suites/Xp
|
|
||||||
comp_suites/printing
|
|
||||||
comp_suites/dtudcexch
|
|
||||||
comp_suites/dtudcfonted
|
|
||||||
comp_suites/dtsr
|
|
||||||
comp_suites/dtdocbook
|
|
||||||
comp_suites/dtinfo
|
|
||||||
comp_suites/onthespot
|
|
||||||
comp_suites/xlib_udc
|
|
||||||
sys_suites/shared
|
|
||||||
sys_suites/Intop
|
|
||||||
sys_suites/Stress
|
|
||||||
sys_suites/CtPast
|
|
||||||
sys_suites/ClipB
|
|
||||||
sys_suites/CtMenu
|
|
||||||
sys_suites/CHO
|
|
|
@ -1,173 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
#
|
|
||||||
# compress_msg.ksh
|
|
||||||
#
|
|
||||||
########################################################################
|
|
||||||
#set -x
|
|
||||||
|
|
||||||
DEBUG="False"
|
|
||||||
ERROR_FILE=""
|
|
||||||
LOG_FILE=""
|
|
||||||
MESSAGE_FILES=""
|
|
||||||
MESSAGES_INIT="XXXXXXX"
|
|
||||||
MESSAGES="$MESSAGES_INIT"
|
|
||||||
PROG_NAME="`basename $0`"
|
|
||||||
|
|
||||||
usage ()
|
|
||||||
{
|
|
||||||
print -u1 "USAGE: $1"
|
|
||||||
print -u1 "\t{-e | -errorfile} <file>"
|
|
||||||
print -u1 "\t # Specifies the error file to send errors."
|
|
||||||
print -u1 "\t[-h | -? | -help]"
|
|
||||||
print -u1 "\t # Print usage and exit"
|
|
||||||
print -u1 "\t[{-l | -logfile} <file>]"
|
|
||||||
print -u1 "\t # Specifies the file containing msgs to be compressed"
|
|
||||||
print -u1 "\t # Defaults to using stdin"
|
|
||||||
print -u1 "\t[{-m | -msgfile} <file>]"
|
|
||||||
print -u1 "\t # Specifies a file containing messages to be"
|
|
||||||
print -u1 "\t # extracted. Multiple -m flags can be specified."
|
|
||||||
print -u1 "\t[messages ...]"
|
|
||||||
print -u1 "\t # Specifies individual messages to be extraced."
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Do command-line processing
|
|
||||||
#
|
|
||||||
while [ $# -gt 0 ]; do
|
|
||||||
case $1 in
|
|
||||||
|
|
||||||
-debug)
|
|
||||||
DEBUG="True"
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
-e | -errorfile)
|
|
||||||
if [ $# -lt 2 ]; then
|
|
||||||
print -u2 "$PROG_NAME: $1 option missing value; exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
ERROR_FILE=$2
|
|
||||||
shift 2 ;;
|
|
||||||
|
|
||||||
-m | -msgfile)
|
|
||||||
MESSAGE_FILES="$MESSAGE_FILES $2"
|
|
||||||
shift 2 ;;
|
|
||||||
|
|
||||||
-l | -logfile)
|
|
||||||
if [ $# -lt 2 ]; then
|
|
||||||
print -u2 "$PROG_NAME: $1 option missing value; exiting ..."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
LOG_FILE=$2
|
|
||||||
shift 2 ;;
|
|
||||||
|
|
||||||
-h | -? | -help)
|
|
||||||
usage $PROG_NAME
|
|
||||||
exit 1 ;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
MESSAGES="$MESSAGES|$1"
|
|
||||||
shift 1;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ ! -z "$ERROR_FILE" ]
|
|
||||||
then
|
|
||||||
exec 2>> $ERROR_FILE
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# Check to make sure that the command-line parameters make sense.
|
|
||||||
#
|
|
||||||
if [ -z "$MESSAGE_FILES" ] && [ "$MESSAGES" = "$MESSAGES_INIT" ]
|
|
||||||
then
|
|
||||||
print -u2 "$PROG_NAME: No messages or message files have been specified."
|
|
||||||
print -u2 "$PROG_NAME: exiting ..."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
for f in $MESSAGE_FILES
|
|
||||||
do
|
|
||||||
if [ ! -f $f ]
|
|
||||||
then
|
|
||||||
print -u2 "$PROG_NAME: Message file \"$f\" does not exist; exiting ..."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ -n "$LOG_FILE" -a ! -f "$LOG_FILE" ]
|
|
||||||
then
|
|
||||||
print -u2 "$PROG_NAME: Log file \"$LOG_FILE\" does not exist; exiting ..."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# Collect all the regular expressions from the message files
|
|
||||||
# ignoring those that have been commented out.
|
|
||||||
#
|
|
||||||
for f in $MESSAGE_FILES
|
|
||||||
do
|
|
||||||
IFS="
|
|
||||||
"
|
|
||||||
for m in `cat $f`
|
|
||||||
do
|
|
||||||
MESSAGES="$MESSAGES|$m"
|
|
||||||
done
|
|
||||||
IFS=" "
|
|
||||||
done
|
|
||||||
|
|
||||||
#
|
|
||||||
# Build the awk script
|
|
||||||
#
|
|
||||||
SCRIPT=/tmp/${PROG_NAME}.$$.awk
|
|
||||||
|
|
||||||
touch $SCRIPT
|
|
||||||
chmod 775 $SCRIPT
|
|
||||||
print -n -u1 'BEGIN {
|
|
||||||
do_print = 0
|
|
||||||
}
|
|
||||||
/.*/ {
|
|
||||||
if (' >> $SCRIPT
|
|
||||||
|
|
||||||
IFS="|"
|
|
||||||
let i=0
|
|
||||||
for m in $MESSAGES
|
|
||||||
do
|
|
||||||
if [ i -gt 0 ]; then
|
|
||||||
print -n -u1 " || " >> $SCRIPT
|
|
||||||
fi
|
|
||||||
print -n -u1 "index(\$0, \"$m \")" >> $SCRIPT
|
|
||||||
let i=$i+1
|
|
||||||
done
|
|
||||||
IFS=" "
|
|
||||||
|
|
||||||
|
|
||||||
print -n -u1 ') {
|
|
||||||
save = $0
|
|
||||||
do_print = 1
|
|
||||||
next
|
|
||||||
}
|
|
||||||
if (do_print)
|
|
||||||
{
|
|
||||||
print ">>>" save "<<<"
|
|
||||||
do_print = 0
|
|
||||||
}
|
|
||||||
print
|
|
||||||
}' >> $SCRIPT
|
|
||||||
|
|
||||||
#
|
|
||||||
# Use the awk script to extract the desired messages from the log file.
|
|
||||||
#
|
|
||||||
if [ -n "$LOG_FILE" ]; then
|
|
||||||
exec < $LOG_FILE
|
|
||||||
fi
|
|
||||||
awk -f $SCRIPT
|
|
||||||
|
|
||||||
#
|
|
||||||
# Clean up
|
|
||||||
#
|
|
||||||
if [ "$DEBUG" != "True" ]
|
|
||||||
then
|
|
||||||
/bin/rm $SCRIPT
|
|
||||||
fi
|
|
||||||
|
|
||||||
exit 0
|
|
|
@ -1,162 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
#
|
|
||||||
# $TOG: cron_scripts /main/11 1999/04/26 11:42:51 mgreess $
|
|
||||||
#
|
|
||||||
# This script is run on all of the systems where an automated
|
|
||||||
# X build will occur.
|
|
||||||
#
|
|
||||||
# The main benefit of using this script is that if the type of build
|
|
||||||
# that needs to be done changes, (e.g. a clean build is needed
|
|
||||||
# instead of an incremental build), then only this file needs to be
|
|
||||||
# changed and none of the crontabs need to be changed.
|
|
||||||
#
|
|
||||||
#############################################################################
|
|
||||||
|
|
||||||
#
|
|
||||||
# The following trap is needed because of a bug in the UXP (Fujitsu)
|
|
||||||
# version of ksh.
|
|
||||||
#
|
|
||||||
trap 'echo "Trapped signal USR1"' USR1
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Script specific global variables
|
|
||||||
#
|
|
||||||
##########################################################################
|
|
||||||
##########################################################################
|
|
||||||
|
|
||||||
SCRIPTS_DIR="`dirname $0`"
|
|
||||||
if [ "" = "$SCRIPTS_DIR" ]; then
|
|
||||||
SCRIPTS_DIR=/project/dt/scripts
|
|
||||||
fi
|
|
||||||
if [ "" = "$ADMIN_CRON" ]; then
|
|
||||||
ADMIN_CRON=/project/dt/admin/cron
|
|
||||||
fi
|
|
||||||
if [ "" = "$CRON_DATABASE" ]; then
|
|
||||||
CRON_DATABASE=$ADMIN_CRON/crondb
|
|
||||||
fi
|
|
||||||
|
|
||||||
DEBUG=""
|
|
||||||
MAIL_TO=""
|
|
||||||
PROG_NAME="`basename $0`"
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
usage ()
|
|
||||||
{
|
|
||||||
cat <<eof
|
|
||||||
USAGE: $PROG_NAME
|
|
||||||
|
|
||||||
[-debug]
|
|
||||||
# Debugging output
|
|
||||||
[{-db | -database} <cron_database_file>]
|
|
||||||
# Specify the cron database
|
|
||||||
# Default: $CRON_DATABASE
|
|
||||||
[{-m | -mail} <email>]
|
|
||||||
# Specify an alternate email recipient for unexpected output.
|
|
||||||
# Default: $CDE_MAIL_ALIAS or $X_MAIL_ALIAS
|
|
||||||
[{-sd | -script_dir} <directory>]
|
|
||||||
# Specify an alternate directory for required files.
|
|
||||||
# Default: $SCRIPTS_DIR/
|
|
||||||
[-h | -? | -help]
|
|
||||||
# Print usage and exit
|
|
||||||
eof
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
|
|
||||||
while [ $# -gt 0 ]; do
|
|
||||||
case $1 in
|
|
||||||
-debug) DO_DEBUG="True"
|
|
||||||
DEBUG="echo"
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
-db | -database) CRON_DATABASE=$2;
|
|
||||||
shift 2 ;;
|
|
||||||
|
|
||||||
-m | -mail) MAIL_TO=$2;
|
|
||||||
shift 2 ;;
|
|
||||||
|
|
||||||
-sd | -script_dir) SCRIPTS_DIR=$2;
|
|
||||||
export SCRIPTS_DIR;
|
|
||||||
shift 2 ;;
|
|
||||||
|
|
||||||
-h | "-?" | -help | *) usage $PROG_NAME;
|
|
||||||
exit 1;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
#
|
|
||||||
# Capture all of the spurious output to stdout and stderr
|
|
||||||
#
|
|
||||||
LOGFILE=/tmp/$$.log
|
|
||||||
exec > $LOGFILE 2>&1
|
|
||||||
|
|
||||||
#
|
|
||||||
# TRACE should be passed into the script as an environment variable
|
|
||||||
# i.e., TRACE=true cron_scripts ...
|
|
||||||
#
|
|
||||||
if [ "" != "$TRACE" ]; then
|
|
||||||
echo Debugging: $DO_DEBUG
|
|
||||||
echo Cron Database: $CRON_DATABASE
|
|
||||||
echo Mail Recipient: $MAIL_TO
|
|
||||||
echo Scripts Dir: $SCRIPTS_DIR
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Script setup: Do this after the command line parsing to pick up
|
|
||||||
# an alternate setting of SCRIPTS_DIR
|
|
||||||
#
|
|
||||||
if [ ! -f $SCRIPTS_DIR/script_setup.ksh ]; then
|
|
||||||
print -u2 "$PRG: File '$SCRIPTS_DIR/script_setup.ksh' NOT found!"
|
|
||||||
print -u2 "$PRG: Exiting ..."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
. $SCRIPTS_DIR/script_setup.ksh
|
|
||||||
|
|
||||||
do_check_file $CRON_DATABASE -f "NOT found"
|
|
||||||
|
|
||||||
|
|
||||||
COMM="#"
|
|
||||||
DAY="`date +%a`"
|
|
||||||
HOST="`uname -n | sed '/\./s/\..*//'`"
|
|
||||||
HOUR="`date +%H`"
|
|
||||||
|
|
||||||
cat $CRON_DATABASE | while read LINE; do
|
|
||||||
|
|
||||||
ENTRY="`echo $LINE | grep -v $COMM | grep $HOST | grep $DAY | grep $HOUR`"
|
|
||||||
EDAY="`echo $ENTRY | awk '{ print $1 }'`"
|
|
||||||
EHOUR="`echo $ENTRY | awk '{ print $2 }'`"
|
|
||||||
EHOST="`echo $ENTRY | awk '{ print $3 }'`"
|
|
||||||
EVIEW="`echo $ENTRY | awk '{ print $4 }'`"
|
|
||||||
ECOMMAND="`echo $ENTRY | awk '{ for (i=5; i<=NF; i++) printf(\"%s \",$i) }'`"
|
|
||||||
|
|
||||||
if [ -n "$ENTRY" -a "$HOUR" = "$EHOUR" ]; then
|
|
||||||
if [ "none" = "$EVIEW" ]; then
|
|
||||||
$DEBUG $ECOMMAND
|
|
||||||
else
|
|
||||||
$DEBUG $CLEAR_CASE_TOOL setview -exec "$ECOMMAND" $EVIEW
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ -s $LOGFILE ]; then
|
|
||||||
if [ "" = "$MAIL_TO" ]; then
|
|
||||||
if [ "`basename $CRON_DATABASE`" = "trw.crondb" ]; then
|
|
||||||
MAIL_TO=$TRW_MAIL_ALIAS
|
|
||||||
elif [ "`basename $CRON_DATABASE`" = "cde.crondb" ]; then
|
|
||||||
MAIL_TO=$CDE_MAIL_ALIAS
|
|
||||||
elif [ "`basename $CRON_DATABASE`" = "x.crondb" ]; then
|
|
||||||
MAIL_TO=$X_MAIL_ALIAS
|
|
||||||
else
|
|
||||||
MAIL_TO=$CDE_MAIL_ALIAS
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
mailx -s "Warning: unexpected cron output" $MAIL_TO < $LOGFILE
|
|
||||||
fi
|
|
||||||
rm -f $LOGFILE
|
|
|
@ -1,32 +0,0 @@
|
||||||
ERROR
|
|
||||||
Error:
|
|
||||||
Error
|
|
||||||
Error code
|
|
||||||
error code
|
|
||||||
failed
|
|
||||||
ERROR
|
|
||||||
:E:
|
|
||||||
Can\'t
|
|
||||||
Cannot write
|
|
||||||
Cannot find
|
|
||||||
Don\'t
|
|
||||||
FATAL
|
|
||||||
No space
|
|
||||||
\(S\)
|
|
||||||
\(U\)
|
|
||||||
SGML error
|
|
||||||
^gencat:
|
|
||||||
cannot
|
|
||||||
core dumped
|
|
||||||
couldn't
|
|
||||||
error:
|
|
||||||
error;
|
|
||||||
failed:
|
|
||||||
fatal:
|
|
||||||
killed
|
|
||||||
not found
|
|
||||||
parser errors
|
|
||||||
permission
|
|
||||||
too many
|
|
||||||
Must be a separator
|
|
||||||
I\/O error
|
|
|
@ -1,7 +0,0 @@
|
||||||
dfiles d Basic Error FolioObject
|
|
||||||
dfiles h Basic Error FolioObject
|
|
||||||
dfiles d Basic Error FolioObject
|
|
||||||
dfiles h Basic Error FolioObject
|
|
||||||
tt_client_on_exit_killed
|
|
||||||
UX:make: ERROR: \$\? \(bu35\)
|
|
||||||
SGML error at
|
|
|
@ -1,10 +0,0 @@
|
||||||
cleaning in
|
|
||||||
depending in
|
|
||||||
including in
|
|
||||||
making Makefiles in
|
|
||||||
making all in
|
|
||||||
making imake with
|
|
||||||
building in
|
|
||||||
build installing in
|
|
||||||
build install in
|
|
||||||
extracting errors and warnings in
|
|
|
@ -1,8 +0,0 @@
|
||||||
WARNING
|
|
||||||
Warning
|
|
||||||
Warning:
|
|
||||||
warning
|
|
||||||
warning:
|
|
||||||
warning\(
|
|
||||||
\(E\)
|
|
||||||
mkcatdefs: no
|
|
|
@ -1,278 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
#
|
|
||||||
# extract_log.ksh
|
|
||||||
#
|
|
||||||
########################################################################
|
|
||||||
#set -x
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Script setup: THIS NEEDS TO BE FIRST
|
|
||||||
#
|
|
||||||
SCRIPTS_DIR="`dirname $0`"
|
|
||||||
if [ "" = "$SCRIPTS_DIR" ]; then
|
|
||||||
SCRIPTS_DIR=/project/dt/scripts
|
|
||||||
fi
|
|
||||||
if [ ! -f $SCRIPTS_DIR/script_setup.ksh ]; then
|
|
||||||
print -u2 "$PRG: File '$SCRIPTS_DIR/script_setup.ksh' NOT found!"
|
|
||||||
print -u2 "$PRG: Exiting ..."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
. $SCRIPTS_DIR/script_setup.ksh
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Script specific global variables
|
|
||||||
#
|
|
||||||
##########################################################################
|
|
||||||
##########################################################################
|
|
||||||
COMPONENTS_FILES=""
|
|
||||||
COMPONENTS=""
|
|
||||||
DEBUG="False"
|
|
||||||
LOG_FILE=""
|
|
||||||
ERROR_FILE=""
|
|
||||||
LOG_DIRECTORY=""
|
|
||||||
PROG_NAME="`basename $0`"
|
|
||||||
|
|
||||||
usage ()
|
|
||||||
{
|
|
||||||
print -u1 "USAGE: $1"
|
|
||||||
print -u1 "\t[{-c | -components_file} <file>]"
|
|
||||||
print -u1 "\t # Specifies a file containing a list of components to"
|
|
||||||
print -u1 "\t # be extracted. Multiple -c flags can be specified."
|
|
||||||
print -u1 "\t{-e | -errorfile} <file>"
|
|
||||||
print -u1 "\t # Specifies the error file to send errors."
|
|
||||||
print -u1 "\t[-h | -? | -help]"
|
|
||||||
print -u1 "\t # Print usage and exit"
|
|
||||||
print -u1 "\t[{-ld | -logdirectory} <directory>]"
|
|
||||||
print -u1 "\t # Specifies an alternative directory to store the"
|
|
||||||
print -u1 "\t # extracted component logs. Defaults to the directory"
|
|
||||||
print -u1 "\t # containing the log file."
|
|
||||||
print -u1 "\t{-l | -logfile} <file>"
|
|
||||||
print -u1 "\t # Specifies the log file to be extracted from."
|
|
||||||
print -u1 "\t[component ...]"
|
|
||||||
print -u1 "\t # Specifies individual components to be extraced."
|
|
||||||
print -u1 "\t # Each component specification is should correspond"
|
|
||||||
print -u1 "\t # to an individual directory in the source tree."
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Do command-line processing
|
|
||||||
#
|
|
||||||
while [ $# -gt 0 ]; do
|
|
||||||
case $1 in
|
|
||||||
|
|
||||||
-debug)
|
|
||||||
DEBUG="True"
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
-c | -components_file)
|
|
||||||
if [ $# -lt 2 ]; then
|
|
||||||
print -u2 "$PROG_NAME: $1 option missing value; exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
COMPONENTS_FILES="$2 $COMPONENTS_FILES"
|
|
||||||
shift 2 ;;
|
|
||||||
|
|
||||||
-e | -errorfile)
|
|
||||||
if [ $# -lt 2 ]; then
|
|
||||||
print -u2 "$PROG_NAME: $1 option missing value; exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
ERROR_FILE=$2
|
|
||||||
shift 2 ;;
|
|
||||||
|
|
||||||
-ld | -logdirectory)
|
|
||||||
if [ $# -lt 2 ]; then
|
|
||||||
print -u2 "$PROG_NAME: $1 option missing value; exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
LOG_DIRECTORY=$2
|
|
||||||
shift 2 ;;
|
|
||||||
|
|
||||||
-l | -logfile)
|
|
||||||
if [ $# -lt 2 ]; then
|
|
||||||
print -u2 "$PROG_NAME: $1 option missing value; exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
LOG_FILE=$2
|
|
||||||
shift 2 ;;
|
|
||||||
|
|
||||||
-h | -? | -help)
|
|
||||||
usage $PROG_NAME
|
|
||||||
do_exit 1 ;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
COMPONENTS="$COMPONENTS $1"
|
|
||||||
shift 1;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ ! -z "$ERROR_FILE" ]
|
|
||||||
then
|
|
||||||
exec 2>> $ERROR_FILE
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# Check to make sure that the command-line parameters make sense.
|
|
||||||
#
|
|
||||||
if [ -z "$COMPONENTS_FILES" ] && [ -z "$COMPONENTS" ]
|
|
||||||
then
|
|
||||||
print -u2 "$PROG_NAME: No components or component files specified."
|
|
||||||
print -u2 "$PROG_NAME: exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
for f in $COMPONENTS_FILES
|
|
||||||
do
|
|
||||||
if [ ! -f $f ]
|
|
||||||
then
|
|
||||||
print -u2 "$PROG_NAME: Component file \"$f\" does not exist."
|
|
||||||
print -u2 "$PROG_NAME: exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ -z "$LOG_FILE" ]
|
|
||||||
then
|
|
||||||
print -u2 "$PROG_NAME: Missing argument for log file."
|
|
||||||
print -u2 "$PROG_NAME: exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f $LOG_FILE ]
|
|
||||||
then
|
|
||||||
print -u2 "$PROG_NAME: Log file \"$LOG_FILE\" does not exist."
|
|
||||||
print -u2 "$PROG_NAME: exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$LOG_DIRECTORY" ] && [ ! -d $LOG_DIRECTORY ]
|
|
||||||
then
|
|
||||||
print -u2 "$PROG_NAME: Log directory \"$LOG_DIRECTORY\" does not exist."
|
|
||||||
print -u2 "$PROG_NAME: exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$LOG_DIRECTORY" ]
|
|
||||||
then
|
|
||||||
LOG_DIRECTORY=`dirname $LOG_FILE`
|
|
||||||
#
|
|
||||||
# Just being paranoid. dirname should return '.' if there is no
|
|
||||||
# directory component.
|
|
||||||
#
|
|
||||||
if [ -z "$LOG_DIRECTORY" ]
|
|
||||||
then
|
|
||||||
LOG_DIRECTORY='.'
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# Collect all the components from the components files.
|
|
||||||
#
|
|
||||||
for f in "$COMPONENTS_FILES"
|
|
||||||
do
|
|
||||||
for c in `cat $f`
|
|
||||||
do
|
|
||||||
COMPONENTS="$COMPONENTS $c"
|
|
||||||
done
|
|
||||||
done
|
|
||||||
|
|
||||||
#
|
|
||||||
# Collect all the build messages
|
|
||||||
# ignoring those that have been commented out.
|
|
||||||
#
|
|
||||||
MESSAGES="XXXXXXX"
|
|
||||||
IFS="
|
|
||||||
"
|
|
||||||
for m in `cat $BUILD_MSGS`
|
|
||||||
do
|
|
||||||
MESSAGES="$MESSAGES|$m"
|
|
||||||
done
|
|
||||||
IFS=" "
|
|
||||||
|
|
||||||
#
|
|
||||||
# Build the awk script
|
|
||||||
#
|
|
||||||
SCRIPT=/tmp/${PROG_NAME}.$$.awk
|
|
||||||
do_register_temporary_file $SCRIPT
|
|
||||||
|
|
||||||
touch $SCRIPT
|
|
||||||
chmod 775 $SCRIPT
|
|
||||||
print -n -u1 'BEGIN {
|
|
||||||
do_print = 0
|
|
||||||
}
|
|
||||||
/.*/ {
|
|
||||||
if (' >> $SCRIPT
|
|
||||||
|
|
||||||
IFS="|"
|
|
||||||
let i=0
|
|
||||||
for m in $MESSAGES
|
|
||||||
do
|
|
||||||
if [ i -gt 0 ]; then
|
|
||||||
print -n -u1 " || " >> $SCRIPT
|
|
||||||
fi
|
|
||||||
print -n -u1 "index(\$0, \"$m \")" >> $SCRIPT
|
|
||||||
let i=$i+1
|
|
||||||
done
|
|
||||||
IFS=" "
|
|
||||||
|
|
||||||
#
|
|
||||||
# NOTE on: (index($NF, PATTERN) == 1 || index($NF, PATTERN) == 3)
|
|
||||||
# This check is intended to guard against false matches on
|
|
||||||
# subcomponents: i.e. config and programs/dtlogin/config.
|
|
||||||
# The problem is that top level subdirectories show up differently
|
|
||||||
# than lower level directories. E.g.:
|
|
||||||
# /prog/cde/config => making all in ./config...
|
|
||||||
# /prog/cde/programs/dtlogin => making all in programs/dtlogin...
|
|
||||||
#
|
|
||||||
# There are 2 ways to handle this, in the components files or here.
|
|
||||||
# I've chosen here.
|
|
||||||
#
|
|
||||||
print -n -u1 ')
|
|
||||||
{
|
|
||||||
if (index($NF, PATTERN) == 1 || index($NF, PATTERN) == 3)
|
|
||||||
{
|
|
||||||
do_print = 1
|
|
||||||
print
|
|
||||||
next
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
do_print = 0
|
|
||||||
next
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (do_print) print
|
|
||||||
}' >> $SCRIPT
|
|
||||||
|
|
||||||
#
|
|
||||||
# Extract each of the specified component logs.
|
|
||||||
#
|
|
||||||
TMP_LOG_FILE=${LOG_FILE}.$$
|
|
||||||
do_register_temporary_file $TMP_LOG_FILE
|
|
||||||
|
|
||||||
sed -n -e 's/\(.\{0,254\}\).*/\1/p' $LOG_FILE > $TMP_LOG_FILE
|
|
||||||
for c in $COMPONENTS
|
|
||||||
do
|
|
||||||
COMPONENT_LOG=$LOG_DIRECTORY/`echo $c | tr "/" ","`.log
|
|
||||||
PATTERN="$c"
|
|
||||||
|
|
||||||
#
|
|
||||||
# sed protects awk from lines which are too long.
|
|
||||||
#
|
|
||||||
if [ "$DEBUG" = "True" ]
|
|
||||||
then
|
|
||||||
echo "awk -f $SCRIPT PATTERN=$PATTERN $TMP_LOG_FILE >
|
|
||||||
$COMPONENT_LOG"
|
|
||||||
else
|
|
||||||
awk -f $SCRIPT PATTERN=$PATTERN $TMP_LOG_FILE > $COMPONENT_LOG
|
|
||||||
fi
|
|
||||||
|
|
||||||
done
|
|
||||||
|
|
||||||
#
|
|
||||||
# Clean up temporary files and exit
|
|
||||||
#
|
|
||||||
do_exit 0
|
|
|
@ -1,67 +0,0 @@
|
||||||
|
|
||||||
BEGIN {
|
|
||||||
do_print = 0
|
|
||||||
}
|
|
||||||
/making Makefiles in / {
|
|
||||||
pos = match($NF, PATTERN)
|
|
||||||
if (pos == 1) {
|
|
||||||
do_print = 1
|
|
||||||
print
|
|
||||||
next
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
do_print = 0
|
|
||||||
next
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/cleaning in / {
|
|
||||||
pos = match($NF, PATTERN)
|
|
||||||
if (pos == 1) {
|
|
||||||
do_print = 1
|
|
||||||
print
|
|
||||||
next
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
do_print = 0
|
|
||||||
next
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/including in / {
|
|
||||||
pos = match($NF, PATTERN)
|
|
||||||
if (pos == 1) {
|
|
||||||
do_print = 1
|
|
||||||
print
|
|
||||||
next
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
do_print = 0
|
|
||||||
next
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/depending in / {
|
|
||||||
pos = match($NF, PATTERN)
|
|
||||||
if (pos == 1) {
|
|
||||||
do_print = 1
|
|
||||||
print
|
|
||||||
next
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
do_print = 0
|
|
||||||
next
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/making All in / {
|
|
||||||
pos = match($NF, PATTERN)
|
|
||||||
if (pos == 1) {
|
|
||||||
do_print = 1
|
|
||||||
print
|
|
||||||
next
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
do_print = 0
|
|
||||||
next
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/.*/ {
|
|
||||||
if (do_print) print
|
|
||||||
}
|
|
|
@ -1,239 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
#
|
|
||||||
# extract_msg.ksh
|
|
||||||
#
|
|
||||||
########################################################################
|
|
||||||
#set -x
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Script setup: THIS NEEDS TO BE FIRST
|
|
||||||
#
|
|
||||||
SCRIPTS_DIR="`dirname $0`"
|
|
||||||
if [ "" = "$SCRIPTS_DIR" ]; then
|
|
||||||
SCRIPTS_DIR=/project/dt/scripts
|
|
||||||
fi
|
|
||||||
if [ ! -f $SCRIPTS_DIR/script_setup.ksh ]; then
|
|
||||||
print -u2 "$PRG: File '$SCRIPTS_DIR/script_setup.ksh' NOT found!"
|
|
||||||
print -u2 "$PRG: Exiting ..."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
. $SCRIPTS_DIR/script_setup.ksh
|
|
||||||
|
|
||||||
DEBUG="False"
|
|
||||||
IGNORED_MESSAGE_FILES=""
|
|
||||||
IGNORED_MESSAGES_INIT="XXXXXXX"
|
|
||||||
IGNORED_MESSAGES="$IGNORED_MESSAGES_INIT"
|
|
||||||
LOG_FILE=""
|
|
||||||
ERROR_FILE=""
|
|
||||||
MESSAGE_FILES=""
|
|
||||||
MESSAGES_INIT="XXXXXXX"
|
|
||||||
MESSAGES="$MESSAGES_INIT"
|
|
||||||
PROG_NAME="`basename $0`"
|
|
||||||
|
|
||||||
usage ()
|
|
||||||
{
|
|
||||||
print -u1 "USAGE: $1"
|
|
||||||
print -u1 "\t{-e | -errorfile} <file>"
|
|
||||||
print -u1 "\t # Specifies the error file to send errors."
|
|
||||||
print -u1 "\t[-h | -? | -help]"
|
|
||||||
print -u1 "\t # Print usage and exit"
|
|
||||||
print -u1 "\t[{-i | -ignoredmsgfile} <file>]"
|
|
||||||
print -u1 "\t # Specifies a file containing messages to be"
|
|
||||||
print -u1 "\t # ignored. Multiple -i flags can be specified."
|
|
||||||
print -u1 "\t{-l | -logfile} <file>"
|
|
||||||
print -u1 "\t # Specifies the log file to be extracted from."
|
|
||||||
print -u1 "\t[{-m | -msgfile} <file>]"
|
|
||||||
print -u1 "\t # Specifies a file containing messages to be"
|
|
||||||
print -u1 "\t # extracted. Multiple -m flags can be specified."
|
|
||||||
print -u1 "\t[messages ...]"
|
|
||||||
print -u1 "\t # Specifies individual messages to be extraced."
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Do command-line processing
|
|
||||||
#
|
|
||||||
while [ $# -gt 0 ]; do
|
|
||||||
case $1 in
|
|
||||||
|
|
||||||
-debug)
|
|
||||||
DEBUG="True"
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
-e | -errorfile)
|
|
||||||
if [ $# -lt 2 ]; then
|
|
||||||
print -u2 "$PROG_NAME: $1 option missing value; exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
ERROR_FILE=$2
|
|
||||||
shift 2 ;;
|
|
||||||
|
|
||||||
-i | -msgfile)
|
|
||||||
if [ $# -lt 2 ]; then
|
|
||||||
print -u2 "$PROG_NAME: $1 option missing value; exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
IGNORED_MESSAGE_FILES="$IGNORED_MESSAGE_FILES $2"
|
|
||||||
shift 2 ;;
|
|
||||||
|
|
||||||
-m | -msgfile)
|
|
||||||
if [ $# -lt 2 ]; then
|
|
||||||
print -u2 "$PROG_NAME: $1 option missing value; exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
MESSAGE_FILES="$MESSAGE_FILES $2"
|
|
||||||
shift 2 ;;
|
|
||||||
|
|
||||||
-l | -logfile)
|
|
||||||
if [ $# -lt 2 ]; then
|
|
||||||
print -u2 "$PROG_NAME: $1 option missing value; exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
LOG_FILE=$2
|
|
||||||
shift 2 ;;
|
|
||||||
|
|
||||||
-h | -? | -help)
|
|
||||||
usage $PROG_NAME
|
|
||||||
do_exit 1 ;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
MESSAGES="$MESSAGES|$1"
|
|
||||||
shift 1;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ ! -z "$ERROR_FILE" ]
|
|
||||||
then
|
|
||||||
exec 2>> $ERROR_FILE
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# Check to make sure that the command-line parameters make sense.
|
|
||||||
#
|
|
||||||
if [ -z "$MESSAGE_FILES" ] && [ "$MESSAGES" = "$MESSAGES_INIT" ]
|
|
||||||
then
|
|
||||||
print -u2 "$PROG_NAME: No messages or message files have been specified."
|
|
||||||
print -u2 "$PROG_NAME: exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
for f in $IGNORED_MESSAGE_FILES
|
|
||||||
do
|
|
||||||
if [ ! -f $f ]
|
|
||||||
then
|
|
||||||
print -u2 "$PROG_NAME: Message file \"$f\" does not exist; exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
for f in $MESSAGE_FILES
|
|
||||||
do
|
|
||||||
if [ ! -f $f ]
|
|
||||||
then
|
|
||||||
print -u2 "$PROG_NAME: Message file \"$f\" does not exist; exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ -z "$LOG_FILE" ]
|
|
||||||
then
|
|
||||||
print -u2 "$PROG_NAME: Missing argument for log file; exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f $LOG_FILE ]
|
|
||||||
then
|
|
||||||
print -u2 "$PROG_NAME: Log file \"$LOG_FILE\" does not exist; exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# Determine where to find perl.
|
|
||||||
#
|
|
||||||
|
|
||||||
PERL="/usr/local/bin/perl"
|
|
||||||
if [ ! -x $PERL ]
|
|
||||||
then
|
|
||||||
print -u2 "$PROG_NAME: Can't find perl executable $PERL; exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# Collect all the regular expressions from the ignored message files.
|
|
||||||
#
|
|
||||||
for f in $IGNORED_MESSAGE_FILES
|
|
||||||
do
|
|
||||||
IGNORED_MESSAGES="$IGNORED_MESSAGES`sed -e '1,$s/.*/|&/' $f`"
|
|
||||||
done
|
|
||||||
|
|
||||||
#
|
|
||||||
# Collect all the regular expressions from the message files.
|
|
||||||
#
|
|
||||||
for f in $MESSAGE_FILES
|
|
||||||
do
|
|
||||||
MESSAGES="$MESSAGES`sed -e '1,$s/.*/|&/' $f`"
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ "$DEBUG" = "True" ]
|
|
||||||
then
|
|
||||||
print -u1 "======= DEBUG DEBUG IGNORED MESSAGES DEBUG DEBUG ========"
|
|
||||||
print -u1 $IGNORED_MESSAGES
|
|
||||||
print -u1 "======= DEBUG DEBUG ================ DEBUG DEBUG ========"
|
|
||||||
print -u1 "======= DEBUG DEBUG MESSAGES DEBUG DEBUG ========"
|
|
||||||
print -u1 $MESSAGES
|
|
||||||
print -u1 "======= DEBUG DEBUG ================ DEBUG DEBUG ========"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# Build the perl script
|
|
||||||
#
|
|
||||||
SCRIPT=/tmp/${PROG_NAME}.$$.pl
|
|
||||||
if [ "$DEBUG" = "False" ]
|
|
||||||
then
|
|
||||||
do_register_temporary_file $SCRIPT
|
|
||||||
fi
|
|
||||||
|
|
||||||
touch $SCRIPT
|
|
||||||
chmod 755 $SCRIPT
|
|
||||||
print -u1 "#!$PERL" >> $SCRIPT
|
|
||||||
print -u1 "LINE: while (<>) {" >> $SCRIPT
|
|
||||||
|
|
||||||
IFS="|"
|
|
||||||
for m in $IGNORED_MESSAGES
|
|
||||||
do
|
|
||||||
MESSAGE=`echo $m | sed -e 's?\/?\\\/?g'`
|
|
||||||
print -u1 "next LINE if /$MESSAGE/;" >> $SCRIPT
|
|
||||||
done
|
|
||||||
for m in $MESSAGES
|
|
||||||
do
|
|
||||||
MESSAGE=`echo $m | sed -e 's?\/?\\\/?g'`
|
|
||||||
print -u1 "next LINE if /$MESSAGE/ && print;" >> $SCRIPT
|
|
||||||
done
|
|
||||||
IFS=" "
|
|
||||||
|
|
||||||
print -u1 "}" >> $SCRIPT
|
|
||||||
|
|
||||||
if [ "$DEBUG" = "True" ]
|
|
||||||
then
|
|
||||||
print -u1 "======= DEBUG DEBUG SCRIPT DEBUG DEBUG ========"
|
|
||||||
cat $SCRIPT
|
|
||||||
print -u1 "======= DEBUG DEBUG ================ DEBUG DEBUG ========"
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# Use the perl script to extract the desired messages from the log file.
|
|
||||||
#
|
|
||||||
if [ "$DEBUG" = "True" ]
|
|
||||||
then
|
|
||||||
print -u1 "======= DEBUG DEBUG RUN SCRIPT DEBUG DEBUG ========"
|
|
||||||
print -u1 cat $LOG_FILE | $SCRIPT
|
|
||||||
print -u1 "======= DEBUG DEBUG ================ DEBUG DEBUG ========"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat $LOG_FILE | $SCRIPT
|
|
||||||
|
|
||||||
#
|
|
||||||
# Clean up temporary files and exit
|
|
||||||
#
|
|
||||||
do_exit 0
|
|
|
@ -1,139 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
#
|
|
||||||
# initialize_view
|
|
||||||
#
|
|
||||||
########################################################################
|
|
||||||
|
|
||||||
PROG_NAME=$0
|
|
||||||
X_TOP=/proj/x11/xc
|
|
||||||
MOTIF_TOP=/proj/motif
|
|
||||||
CDE_TOP=/proj/cde
|
|
||||||
CDE_TEST_TOP=/proj/cde-test
|
|
||||||
VERBOSE=""
|
|
||||||
DEBUG=""
|
|
||||||
|
|
||||||
usage ()
|
|
||||||
{
|
|
||||||
print -u1 "USAGE: $1"
|
|
||||||
print -u1 "\t[-v | -verbose] # Turn on tracing"
|
|
||||||
print -u1 "\t[-d | -debug] # Print commands but do NOT execute them"
|
|
||||||
}
|
|
||||||
|
|
||||||
while [ $# -gt 0 ]; do
|
|
||||||
case $1 in
|
|
||||||
-v | -verbose) VERBOSE="True"; shift 1 ;;
|
|
||||||
|
|
||||||
-d | -debug) DEBUG="echo"; shift 1 ;;
|
|
||||||
|
|
||||||
-h | -? | -help) usage $PROG_NAME
|
|
||||||
shift 1
|
|
||||||
exit 1 ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ "True" = "$VERBOSE" ]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# Motif
|
|
||||||
#
|
|
||||||
$DEBUG cd $MOTIF_TOP
|
|
||||||
if [ ! -d exports ]; then
|
|
||||||
$DEBUG mkdir exports
|
|
||||||
$DEBUG chmod 777 exports
|
|
||||||
fi
|
|
||||||
if [ ! -d imports ]; then
|
|
||||||
$DEBUG mkdir imports
|
|
||||||
$DEBUG chmod 777 imports
|
|
||||||
fi
|
|
||||||
$DEBUG cd imports
|
|
||||||
if [ ! -L x11 ]; then
|
|
||||||
$DEBUG ln -s ../../x11/xc/exports x11
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# CDE
|
|
||||||
#
|
|
||||||
$DEBUG cd $CDE_TOP
|
|
||||||
if [ ! -d exports ]; then
|
|
||||||
$DEBUG mkdir exports
|
|
||||||
$DEBUG chmod 777 exports
|
|
||||||
fi
|
|
||||||
if [ ! -d imports ]; then
|
|
||||||
$DEBUG mkdir imports
|
|
||||||
$DEBUG chmod 777 imports
|
|
||||||
fi
|
|
||||||
$DEBUG cd imports
|
|
||||||
if [ ! -L x11 ]; then
|
|
||||||
$DEBUG ln -s ../../motif/imports/x11 x11
|
|
||||||
fi
|
|
||||||
if [ ! -L motif ]; then
|
|
||||||
$DEBUG ln -s ../../motif/exports motif
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# CDE test build config links
|
|
||||||
#
|
|
||||||
|
|
||||||
if [ -d $CDE_TEST_TOP/config ]; then
|
|
||||||
$DEBUG cd $CDE_TEST_TOP/config
|
|
||||||
if [ ! -L OSVersion.tmpl ] || [ ! -L localtree.tmpl ]; then
|
|
||||||
|
|
||||||
case "`uname -s`" in
|
|
||||||
HP-UX) if [ ! -L OSVersion.tmpl ]; then
|
|
||||||
$DEBUG ln -s OSVersiontemplates/10.20 OSVersion.tmpl
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -L localtree.tmpl ]; then
|
|
||||||
$DEBUG ln -s localtemplates/hpux/10.20/optimized.shared localtree.tmpl
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
OSF1) if [ ! -L OSVersion.tmpl ]; then
|
|
||||||
$DEBUG ln -s OSVersiontemplates/4.0 OSVersion.tmpl
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -L localtree.tmpl ]; then
|
|
||||||
$DEBUG ln -s localtemplates/dec/alpha/osf/optimized.sharedlibs localtree.tmpl
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
AIX) if [ ! -L OSVersion.tmpl ]; then
|
|
||||||
$DEBUG ln -s OSVersiontemplates/4.2 OSVersion.tmpl
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -L localtree.tmpl ]; then
|
|
||||||
$DEBUG ln -s localtemplates/ibm/rs6000/aix4.2/optimized.sharedlibs localtree.tmpl
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
SunOS) if [ ! -L OSVersion.tmpl ]; then
|
|
||||||
$DEBUG ln -s OSVersiontemplates/5.4 OSVersion.tmpl
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -L localtree.tmpl ]; then
|
|
||||||
$DEBUG ln -s localtemplates/sun/optimized.sharedlibs localtree.tmpl
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
UNIX_SV) if [ ! -L OSVersion.tmpl ]; then
|
|
||||||
$DEBUG ln -s OSVersiontemplates/4.2 OSVersion.tmpl
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -L localtree.tmpl ]; then
|
|
||||||
$DEBUG ln -s localtemplates/sun/optimized.sharedlibs localtree.tmpl
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
*) $DEBUG print -u1 "$PROG_NAME: Test build config links not set up for this architecture"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
else
|
|
||||||
$DEBUG print -u2 "$PROG_NAME: CDE test config directory $CDE_TEST_TOP/config does not exist!"
|
|
||||||
$DEBUG exit 1
|
|
||||||
fi
|
|
||||||
exit 0
|
|
|
@ -1,190 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
#
|
|
||||||
###########################################################################
|
|
||||||
# set -x
|
|
||||||
|
|
||||||
DEBUG=""
|
|
||||||
|
|
||||||
X_TOP=/proj/x11/xc
|
|
||||||
MOTIF_TOP=/proj/motif
|
|
||||||
CDE_TOP=/proj/cde
|
|
||||||
|
|
||||||
LOG_DATE="`date +%h.%d,%H:%M:%S`"
|
|
||||||
LOG_ROOT=/project/dt/logs/install
|
|
||||||
VIEW=`/usr/atria/bin/cleartool pwv -s`
|
|
||||||
LOG_DIR=$LOG_ROOT/$VIEW/$LOG_DATE
|
|
||||||
|
|
||||||
DO_X_INSTALL=False
|
|
||||||
DO_MOTIF_INSTALL=False
|
|
||||||
DO_CDE_INSTALL=False
|
|
||||||
|
|
||||||
CLEAN_CDE=False
|
|
||||||
CLEAN_DIRS="/var/dt /etc/dt"
|
|
||||||
|
|
||||||
INSTALL_ALL_LOC_MSG=False
|
|
||||||
INSTALL_ALL_LOC_HELP=False
|
|
||||||
INSTALL_ALL_LOC_INFO=False
|
|
||||||
|
|
||||||
ALL_LOC_MSG="CDE-DE CDE-MSG-DE CDE-ES CDE-MSG-ES CDE-FR CDE-MSG-FR CDE-IT CDE-MSG-IT CDE-JP CDE-MSG-JP"
|
|
||||||
ALL_LOC_HELP="CDE-HELP-DE CDE-HELP-ES CDE-HELP-FR CDE-HELP-IT CDE-HELP-JP"
|
|
||||||
ALL_LOC_INFO="CDE-INFOLIB-DE CDE-INFOLIB-ES CDE-INFOLIB-FR CDE-INFOLIB-IT CDE-INFOLIB-JP"
|
|
||||||
|
|
||||||
MAKE=/usr/ccs/bin/make
|
|
||||||
if [ "IRIX" = "`uname -s`" ]; then
|
|
||||||
MAKE=/sbin/make
|
|
||||||
fi
|
|
||||||
|
|
||||||
############################################################################
|
|
||||||
|
|
||||||
usage ()
|
|
||||||
{
|
|
||||||
cat <<eof
|
|
||||||
USAGE: $1
|
|
||||||
[-x | -x11] # Install X11 only
|
|
||||||
[-m | -motif] # Install Motif only
|
|
||||||
[-c | -cde] # Install CDE (C locale) only
|
|
||||||
[-lm | -lmsg] # Install non-C locale message filesets ($ALL_LOC_MSG)
|
|
||||||
[-lh | -lhelp] # Install non-C locale help filesets ($ALL_LOC_HELP)
|
|
||||||
[-li | -linfo] # Install non-C locale infolib filesets ($ALL_LOC_INFO)
|
|
||||||
[-a | -all] # Install everything, i.e. -x, -m, -c, -lm, -lh, -li
|
|
||||||
[-clean] # Remove '$CLEAN_DIRS' before installing CDE
|
|
||||||
[-d | -debug] # Print the install commands but do NOT execute them
|
|
||||||
[{-l | -log | -log_dir} <log_dir>] # The default is '$LOG_DIR'
|
|
||||||
[{-mail | mail_list} <user_names>]
|
|
||||||
[-h | -? | -help] # Print usage and exit
|
|
||||||
eof
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
|
|
||||||
while [ $# -gt 0 ]; do
|
|
||||||
case $1 in
|
|
||||||
-x | -x11) DO_X_INSTALL="True"
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
-m | -motif) DO_MOTIF_INSTALL="True"
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
-c | -cde) DO_CDE_INSTALL="True"
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
-a | -all) DO_X_INSTALL="True"
|
|
||||||
DO_MOTIF_INSTALL="True"
|
|
||||||
DO_CDE_INSTALL="True"
|
|
||||||
INSTALL_ALL_LOC_MSG="True"
|
|
||||||
INSTALL_ALL_LOC_HELP="True"
|
|
||||||
INSTALL_ALL_LOC_INFO="True"
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
-lm | -lmsg) INSTALL_ALL_LOC_MSG="True"
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
-lh | -lhelp) INSTALL_ALL_LOC_HELP="True"
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
-li | -linfo) INSTALL_ALL_LOC_INFO="True"
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
-clean) CLEAN_CDE="True"
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
-d | -debug) DEBUG="echo"
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
-l | -log | -log_dir) LOG_DIR=$2;
|
|
||||||
shift 2 ;;
|
|
||||||
|
|
||||||
-mail | -mail_list) MAIL_LIST=$2;
|
|
||||||
shift 2 ;;
|
|
||||||
|
|
||||||
-h | "-?" | -help | *) usage $PROG_NAME;
|
|
||||||
exit 1;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
#
|
|
||||||
# Create the log directory
|
|
||||||
#
|
|
||||||
if [ -z "$CLEARCASE_ROOT" ]; then
|
|
||||||
print -u1 "$0: you must have a view set to do an install. Exiting ... "
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# Create the log directory
|
|
||||||
#
|
|
||||||
if [ ! -d "$LOG_DIR" ]; then
|
|
||||||
$DEBUG mkdir -p $LOG_DIR
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# User must be root to do an install
|
|
||||||
#
|
|
||||||
id | grep root > /dev/null 2>&1
|
|
||||||
if [ "0" != "$?" ]; then
|
|
||||||
print -u1 "$0: only user 'root' may do an install. Exiting ..."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# X
|
|
||||||
#
|
|
||||||
if [ "True" = "$DO_X_INSTALL" ]; then
|
|
||||||
$DEBUG cd $X_TOP
|
|
||||||
$DEBUG $MAKE -i install > $LOG_DIR/x11.install 2>&1
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# Motif
|
|
||||||
#
|
|
||||||
if [ "True" = "$DO_MOTIF_INSTALL" ]; then
|
|
||||||
$DEBUG cd $MOTIF_TOP
|
|
||||||
$DEBUG $MAKE -i install.cde > $LOG_DIR/motif.install 2>&1
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# CDE
|
|
||||||
#
|
|
||||||
if [ "True" = "$CLEAN_CDE" ]; then
|
|
||||||
$DEBUG rm -rf $CLEAN_DIRS
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "True" = "$DO_CDE_INSTALL" ]; then
|
|
||||||
$DEBUG $CDE_TOP/admin/IntegTools/dbTools/installCDE \
|
|
||||||
-s $CDE_TOP \
|
|
||||||
> $LOG_DIR/cde.install 2>&1
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# All localized msgs
|
|
||||||
#
|
|
||||||
if [ "True" = "$INSTALL_ALL_LOC_MSG" ]; then
|
|
||||||
$DEBUG $CDE_TOP/admin/IntegTools/dbTools/installCDE \
|
|
||||||
-s $CDE_TOP \
|
|
||||||
-f "$ALL_LOC_MSG" > \
|
|
||||||
$LOG_DIR/localized_msg.install 2>&1
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# All localized help
|
|
||||||
#
|
|
||||||
if [ "True" = "$INSTALL_ALL_LOC_HELP" ]; then
|
|
||||||
$DEBUG $CDE_TOP/admin/IntegTools/dbTools/installCDE \
|
|
||||||
-s $CDE_TOP \
|
|
||||||
-f "$ALL_LOC_HELP" > \
|
|
||||||
$LOG_DIR/localized_help.install 2>&1
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# All localized infolibs
|
|
||||||
#
|
|
||||||
if [ "True" = "$INSTALL_ALL_LOC_INFO" ]; then
|
|
||||||
$DEBUG $CDE_TOP/admin/IntegTools/dbTools/installCDE \
|
|
||||||
-s $CDE_TOP \
|
|
||||||
-f "$ALL_LOC_INFO" > \
|
|
||||||
$LOG_DIR/localized_infolibs.install 2>&1
|
|
||||||
fi
|
|
||||||
|
|
||||||
mv /tmp/CDE* $LOG_DIR
|
|
|
@ -1,99 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
#
|
|
||||||
# make_report_dir
|
|
||||||
#
|
|
||||||
########################################################################
|
|
||||||
#set -x
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Script setup: THIS NEEDS TO BE FIRST
|
|
||||||
#
|
|
||||||
SCRIPTS_DIR="`dirname $0`"
|
|
||||||
if [ "" = "$SCRIPTS_DIR" ]; then
|
|
||||||
SCRIPTS_DIR=/project/dt/scripts
|
|
||||||
fi
|
|
||||||
if [ ! -f $SCRIPTS_DIR/script_setup.ksh ]; then
|
|
||||||
print -u2 "$PRG: File '$SCRIPTS_DIR/script_setup.ksh' NOT found!"
|
|
||||||
print -u2 "$PRG: Exiting ..."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
. $SCRIPTS_DIR/script_setup.ksh
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Script specific global variables
|
|
||||||
#
|
|
||||||
##########################################################################
|
|
||||||
##########################################################################
|
|
||||||
|
|
||||||
DEBUG="False"
|
|
||||||
LOG_PATH="/project/dt/logs/build/reports/LATEST"
|
|
||||||
PROG_NAME="`basename $0`"
|
|
||||||
|
|
||||||
usage ()
|
|
||||||
{
|
|
||||||
cat <<eof
|
|
||||||
USAGE: $PROG_NAME
|
|
||||||
[-log_path <path>]
|
|
||||||
[-h | -? | -help]
|
|
||||||
# Print usage and exit
|
|
||||||
#
|
|
||||||
# '$PROG_NAME' creates a directory in the parent of the
|
|
||||||
# specified path. The directory name is derived from the
|
|
||||||
# current date. It then creates a link from the newly
|
|
||||||
# created directory to the specified path in the same
|
|
||||||
# parent directory.
|
|
||||||
eof
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Do command-line processing
|
|
||||||
#
|
|
||||||
while [ $# -gt 0 ]; do
|
|
||||||
|
|
||||||
case $1 in
|
|
||||||
|
|
||||||
-debug)
|
|
||||||
DEBUG="True"
|
|
||||||
shift ;;
|
|
||||||
|
|
||||||
-h | -help | '-?')
|
|
||||||
usage $PROG_NAME
|
|
||||||
do_exit 1 ;;
|
|
||||||
|
|
||||||
-lp | -log_path )
|
|
||||||
if [ $# -lt 2 ]; then
|
|
||||||
print -u2 "$PROG_NAME: $1 option missing value; exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
LOG_PATH=$2
|
|
||||||
shift 2 ;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
print -u2 "$PROG_NAME: invalid option $1; exiting ..."
|
|
||||||
do_exit 1 ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
PARENT_REPORT_DIR=`dirname $LOG_PATH`
|
|
||||||
REPORT_DIR=`basename $LOG_PATH`
|
|
||||||
REPORT_DATE="`date +%h%d`"
|
|
||||||
|
|
||||||
if [ ! -d "$PARENT_REPORT_DIR/$REPORT_DATE" ]; then
|
|
||||||
if [ -h "$PARENT_REPORT_DIR/$REPORT_DATE" ]; then
|
|
||||||
rm "$PARENT_REPORT_DIR/$REPORT_DATE"
|
|
||||||
fi
|
|
||||||
mkdir -p "$PARENT_REPORT_DIR/$REPORT_DATE"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -h "$PARENT_REPORT_DIR/$REPORT_DIR" ]; then
|
|
||||||
rm "$PARENT_REPORT_DIR/$REPORT_DIR"
|
|
||||||
fi
|
|
||||||
ln -s "$REPORT_DATE" "$PARENT_REPORT_DIR/$REPORT_DIR"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Clean up temporary files and exit
|
|
||||||
#
|
|
||||||
do_exit 1
|
|
|
@ -1,13 +0,0 @@
|
||||||
bindings
|
|
||||||
bitmaps
|
|
||||||
clients/mwm
|
|
||||||
clients/uil
|
|
||||||
clients/xmbind
|
|
||||||
config
|
|
||||||
demos
|
|
||||||
doc
|
|
||||||
lib/Xm
|
|
||||||
lib/Mrm
|
|
||||||
localized
|
|
||||||
tests
|
|
||||||
tools/wml
|
|
|
@ -1,96 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
#
|
|
||||||
# prune_logs
|
|
||||||
#
|
|
||||||
########################################################################
|
|
||||||
#set -x
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Script setup: THIS NEEDS TO BE FIRST
|
|
||||||
#
|
|
||||||
SCRIPTS_DIR="`dirname $0`"
|
|
||||||
if [ "" = "$SCRIPTS_DIR" ]; then
|
|
||||||
SCRIPTS_DIR=/project/dt/scripts
|
|
||||||
fi
|
|
||||||
if [ ! -f $SCRIPTS_DIR/script_setup.ksh ]; then
|
|
||||||
print -u2 "$PRG: File '$SCRIPTS_DIR/script_setup.ksh' NOT found!"
|
|
||||||
print -u2 "$PRG: Exiting ..."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
. $SCRIPTS_DIR/script_setup.ksh
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Script specific global variables
|
|
||||||
#
|
|
||||||
##########################################################################
|
|
||||||
##########################################################################
|
|
||||||
DEBUG=""
|
|
||||||
FIND_OPTIONS=""
|
|
||||||
OUTFILE="/dev/null"
|
|
||||||
PATHNAME_LIST=""
|
|
||||||
PROG_NAME="`basename $0`"
|
|
||||||
|
|
||||||
usage ()
|
|
||||||
{
|
|
||||||
cat <<eof
|
|
||||||
USAGE: $PROG_NAME [options] pathname_list
|
|
||||||
|
|
||||||
[-debug]
|
|
||||||
# Debugging output
|
|
||||||
[-atime +ndays]
|
|
||||||
[-ctime +ndays]
|
|
||||||
[-mtime +ndays]
|
|
||||||
# These flags are passed directly to find to identify
|
|
||||||
# which files and directories should pass the test for
|
|
||||||
# deletion.
|
|
||||||
[-h | -? | -help]
|
|
||||||
# Print usage and exit
|
|
||||||
|
|
||||||
pathname_list
|
|
||||||
# List of directories to be searched for out-of-date
|
|
||||||
# log files
|
|
||||||
|
|
||||||
$PROG_NAME uses find to search all the directories listed in
|
|
||||||
pathname_list for files and subdirectories which are out-of-date
|
|
||||||
as specified by the -atime, -ctime, and -mtime flags deleting
|
|
||||||
any so identified.
|
|
||||||
eof
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Do command-line processing
|
|
||||||
#
|
|
||||||
while [ $# -gt 0 ]; do
|
|
||||||
case $1 in
|
|
||||||
|
|
||||||
-debug)
|
|
||||||
DEBUG="echo"
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
-atime | -ctime | -mtime)
|
|
||||||
if [ $# -lt 2 ]; then
|
|
||||||
print -u2 "$PROG_NAME: $1 option missing value; exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
FIND_OPTIONS="$FIND_OPTIONS $1 $2 "
|
|
||||||
shift 2 ;;
|
|
||||||
|
|
||||||
-h | "-?" | -help)
|
|
||||||
usage $PROG_NAME;
|
|
||||||
do_exit 1 ;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
PATHNAME_LIST="$PATHNAME_LIST $1"
|
|
||||||
shift 1;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
#
|
|
||||||
# Clean up temporary files and exit
|
|
||||||
#
|
|
||||||
$DEBUG find $PATHNAME_LIST -depth -name '*' $FIND_OPTIONS -exec rm -f {} ";" > $OUTFILE 2>&1
|
|
||||||
|
|
||||||
do_exit 0
|
|
|
@ -1,96 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
#
|
|
||||||
# prune_logs
|
|
||||||
#
|
|
||||||
########################################################################
|
|
||||||
#set -x
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Script setup: THIS NEEDS TO BE FIRST
|
|
||||||
#
|
|
||||||
SCRIPTS_DIR="`dirname $0`"
|
|
||||||
if [ "" = "$SCRIPTS_DIR" ]; then
|
|
||||||
SCRIPTS_DIR=/project/dt/scripts
|
|
||||||
fi
|
|
||||||
if [ ! -f $SCRIPTS_DIR/script_setup.ksh ]; then
|
|
||||||
print -u2 "$PRG: File '$SCRIPTS_DIR/script_setup.ksh' NOT found!"
|
|
||||||
print -u2 "$PRG: Exiting ..."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
. $SCRIPTS_DIR/script_setup.ksh
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Script specific global variables
|
|
||||||
#
|
|
||||||
##########################################################################
|
|
||||||
##########################################################################
|
|
||||||
DEBUG=""
|
|
||||||
FIND_OPTIONS=""
|
|
||||||
OUTFILE="/dev/null"
|
|
||||||
PATHNAME_LIST=""
|
|
||||||
PROG_NAME="`basename $0`"
|
|
||||||
|
|
||||||
usage ()
|
|
||||||
{
|
|
||||||
cat <<eof
|
|
||||||
USAGE: $PROG_NAME [options] pathname_list
|
|
||||||
|
|
||||||
[-debug]
|
|
||||||
# Debugging output
|
|
||||||
[-atime +ndays]
|
|
||||||
[-ctime +ndays]
|
|
||||||
[-mtime +ndays]
|
|
||||||
# These flags are passed directly to find to identify
|
|
||||||
# which files and directories should pass the test for
|
|
||||||
# deletion.
|
|
||||||
[-h | -? | -help]
|
|
||||||
# Print usage and exit
|
|
||||||
|
|
||||||
pathname_list
|
|
||||||
# List of directories to be searched for out-of-date
|
|
||||||
# log files
|
|
||||||
|
|
||||||
$PROG_NAME uses find to search all the directories listed in
|
|
||||||
pathname_list for files and subdirectories which are out-of-date
|
|
||||||
as specified by the -atime, -ctime, and -mtime flags deleting
|
|
||||||
any so identified.
|
|
||||||
eof
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Do command-line processing
|
|
||||||
#
|
|
||||||
while [ $# -gt 0 ]; do
|
|
||||||
case $1 in
|
|
||||||
|
|
||||||
-debug)
|
|
||||||
DEBUG="echo"
|
|
||||||
shift 1 ;;
|
|
||||||
|
|
||||||
-atime | -ctime | -mtime)
|
|
||||||
if [ $# -lt 2 ]; then
|
|
||||||
print -u2 "$PROG_NAME: $1 option missing value; exiting ..."
|
|
||||||
do_exit 1
|
|
||||||
fi
|
|
||||||
FIND_OPTIONS="$FIND_OPTIONS $1 $2 "
|
|
||||||
shift 2 ;;
|
|
||||||
|
|
||||||
-h | "-?" | -help)
|
|
||||||
usage $PROG_NAME;
|
|
||||||
do_exit 1 ;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
PATHNAME_LIST="$PATHNAME_LIST $1"
|
|
||||||
shift 1;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
#
|
|
||||||
# Clean up temporary files and exit
|
|
||||||
#
|
|
||||||
$DEBUG find $PATHNAME_LIST -depth -name '*' $FIND_OPTIONS -exec gzip -f {} ";" > $OUTFILE 2>&1
|
|
||||||
|
|
||||||
do_exit 0
|
|
|
@ -1,155 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
#
|
|
||||||
# script_setup.ksh
|
|
||||||
#
|
|
||||||
########################################################################
|
|
||||||
#set -x
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Common global code
|
|
||||||
#
|
|
||||||
##########################################################################
|
|
||||||
##########################################################################
|
|
||||||
umask 002
|
|
||||||
TEMPORARY_FILES=""
|
|
||||||
trap '/bin/rm -f $TEMPORARY_FILES; exit 1' INT QUIT TERM
|
|
||||||
|
|
||||||
do_exit ()
|
|
||||||
{
|
|
||||||
do_delete_temporary_files
|
|
||||||
exit $1
|
|
||||||
}
|
|
||||||
|
|
||||||
do_delete_temporary_files ()
|
|
||||||
{
|
|
||||||
if [ -n "$TEMPORARY_FILES" ]; then
|
|
||||||
/bin/rm -f $TEMPORARY_FILES
|
|
||||||
TEMPORARY_FILES=""
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
do_register_temporary_file ()
|
|
||||||
{
|
|
||||||
if [ -n "$1" ]; then
|
|
||||||
if [ -z "$TEMPORARY_FILES" ]; then
|
|
||||||
TEMPORARY_FILES="$1"
|
|
||||||
else
|
|
||||||
TEMPORARY_FILES="$TEMPORARY_FILES $1"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
do_check_file ()
|
|
||||||
{
|
|
||||||
# $1 = the file to check
|
|
||||||
# $2 = file flag (e.g. "x" for -x, "f" for -f, etc.
|
|
||||||
# #3 = error message
|
|
||||||
|
|
||||||
case $2 in
|
|
||||||
-x) if [ ! -x $1 ]; then
|
|
||||||
print -u2 "Exiting ... Executable '$1 $3"
|
|
||||||
do_exit 1
|
|
||||||
fi ;;
|
|
||||||
-d) if [ ! -d $1 ]; then
|
|
||||||
print -u2 "Exiting ... Directory '$1 $3"
|
|
||||||
do_exit 1
|
|
||||||
fi ;;
|
|
||||||
-f) if [ ! -f $1 ]; then
|
|
||||||
print -u2 "Exiting ... File '$1 $3"
|
|
||||||
do_exit 1
|
|
||||||
fi ;;
|
|
||||||
-L) if [ ! -L $1 ]; then
|
|
||||||
print -u2 "Exiting ... Sym link '$1 $3"
|
|
||||||
do_exit 1
|
|
||||||
fi ;;
|
|
||||||
*) print -u2 "Exiting ... '$1' NOT found!"
|
|
||||||
do_exit 1 ;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Directory and executable paths.
|
|
||||||
#
|
|
||||||
CLEAR_CASE_TOOL=/usr/atria/bin/cleartool
|
|
||||||
if [ "" = "$PROJECT_NAME" ]; then
|
|
||||||
LOG_DIR_BASE=/project/dt/logs/build
|
|
||||||
else
|
|
||||||
LOG_DIR_BASE=/project/${PROJECT_NAME}/logs/build
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Initialize the scripts and data files
|
|
||||||
#
|
|
||||||
BUILD_PROJECT=$SCRIPTS_DIR/build_project
|
|
||||||
BUILD_SUMMARY=$SCRIPTS_DIR/build_summary
|
|
||||||
BUILD_WORLD=$SCRIPTS_DIR/build_world
|
|
||||||
COMPONENT_FILE="-c $SCRIPTS_DIR/cde.components"
|
|
||||||
COMPRESS_MSG=$SCRIPTS_DIR/compress_msg
|
|
||||||
EXTRACT_LOG=$SCRIPTS_DIR/extract_log
|
|
||||||
EXTRACT_MSG=$SCRIPTS_DIR/extract_msg
|
|
||||||
INITIALIZE_VIEW=$SCRIPTS_DIR/initialize_view
|
|
||||||
|
|
||||||
CDE_COMPONENTS=$SCRIPTS_DIR/cde.components
|
|
||||||
CDEDOC_COMPONENTS=$SCRIPTS_DIR/cdedoc.components
|
|
||||||
CDETEST_COMPONENTS=$SCRIPTS_DIR/cdetest.components
|
|
||||||
MOTIF_COMPONENTS=$SCRIPTS_DIR/motif.components
|
|
||||||
X_COMPONENTS=$SCRIPTS_DIR/x11.components
|
|
||||||
BUILD_MSGS=$SCRIPTS_DIR/dt_make.msg
|
|
||||||
ERROR_MSGS=$SCRIPTS_DIR/dt_errors.msg
|
|
||||||
IGNORE_MSGS=$SCRIPTS_DIR/dt_ignore.msg
|
|
||||||
WARNING_MSGS=$SCRIPTS_DIR/dt_warnings.msg
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Strings used in the Subject line of mailed reports
|
|
||||||
#
|
|
||||||
SUBJECT_BUILD_SUMMARY="CDE: Build Summary"
|
|
||||||
SUBJECT_SUBMISSIONS="CDE: Submissions"
|
|
||||||
SUBJECT_CHECKOUTS="CDE: Check-Outs"
|
|
||||||
SUBJECT_BUILD_COMPLETE="CDE: Build Complete"
|
|
||||||
SUBJECT_DATE='+%m/%d/%y'
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Build Strings marking information extracted by the build_summary script.
|
|
||||||
#
|
|
||||||
BTAG_CMPL="BUILD COMPLETE"
|
|
||||||
BTAG_CFGS="BUILD CFG SPEC"
|
|
||||||
BTAG_DATE="BUILD DATE "
|
|
||||||
BTAG_DFMT="+%a %h %d, %H:%M"
|
|
||||||
BTAG_LOGD="BUILD LOG DIR "
|
|
||||||
BTAG_PRJT="BUILD PROJECT "
|
|
||||||
BTAG_PTFM="BUILD PLATFORM"
|
|
||||||
BTAG_TYPE="BUILD TYPE "
|
|
||||||
BTAG_VIEW="BUILD VIEW "
|
|
||||||
|
|
||||||
BTAG_ENDD="BUILD ENDED "
|
|
||||||
BTAG_LOGF="LOG FILE "
|
|
||||||
BTAG_STRT="BUILD STARTED "
|
|
||||||
BTAG_SYST="SYSTEM "
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# TOP of project development hierarchies
|
|
||||||
#
|
|
||||||
X_TOP=/proj/x11/xc
|
|
||||||
MOTIF_TOP=/proj/motif
|
|
||||||
CDE_TOP=/proj/cde
|
|
||||||
CDEDOC_TOP=/proj/cde
|
|
||||||
CDETEST_TOP=/proj/cde-test
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
#
|
|
||||||
# Mail aliases for the project groups
|
|
||||||
#
|
|
||||||
TRW_MAIL_ALIAS="devtrw"
|
|
||||||
CDE_MAIL_ALIAS="devobj"
|
|
||||||
X_MAIL_ALIAS="devobj"
|
|
|
@ -1,85 +0,0 @@
|
||||||
config
|
|
||||||
doc
|
|
||||||
fonts
|
|
||||||
lib/FS
|
|
||||||
lib/ICE
|
|
||||||
lib/PEX5
|
|
||||||
lib/SM
|
|
||||||
lib/X11
|
|
||||||
lib/XIE
|
|
||||||
lib/Xa
|
|
||||||
lib/Xau
|
|
||||||
lib/Xaw
|
|
||||||
lib/Xbsd
|
|
||||||
lib/Xdmcp
|
|
||||||
lib/Xext
|
|
||||||
lib/Xi
|
|
||||||
lib/Xmu
|
|
||||||
lib/Xp
|
|
||||||
lib/Xt
|
|
||||||
lib/Xtst
|
|
||||||
lib/font
|
|
||||||
lib/lbxutil
|
|
||||||
lib/oldX
|
|
||||||
lib/xkbfile
|
|
||||||
lib/xtrans
|
|
||||||
lib/zlib
|
|
||||||
nls
|
|
||||||
programs/Xaserver
|
|
||||||
programs/Xserver
|
|
||||||
programs/appres
|
|
||||||
programs/bdftopcf
|
|
||||||
programs/bitmap
|
|
||||||
programs/editres
|
|
||||||
programs/fsinfo
|
|
||||||
programs/fslsfonts
|
|
||||||
programs/fstobdf
|
|
||||||
programs/iceauth
|
|
||||||
programs/lbxproxy
|
|
||||||
programs/mkfontdir
|
|
||||||
programs/oclock
|
|
||||||
programs/proxymngr
|
|
||||||
programs/rgb
|
|
||||||
programs/rstart
|
|
||||||
programs/scripts
|
|
||||||
programs/smproxy
|
|
||||||
programs/twm
|
|
||||||
programs/x11perf
|
|
||||||
programs/xauth
|
|
||||||
programs/xclipboard
|
|
||||||
programs/xclock
|
|
||||||
programs/xcmsdb
|
|
||||||
programs/xconsole
|
|
||||||
programs/xdm
|
|
||||||
programs/xdpyinfo
|
|
||||||
programs/xfd
|
|
||||||
programs/xfindproxy
|
|
||||||
programs/xfs
|
|
||||||
programs/xfwp
|
|
||||||
programs/xhost
|
|
||||||
programs/xieperf
|
|
||||||
programs/xinit
|
|
||||||
programs/xkbcomp
|
|
||||||
programs/xkbevd
|
|
||||||
programs/xkbprint
|
|
||||||
programs/xkbutils
|
|
||||||
programs/xkill
|
|
||||||
programs/xlogo
|
|
||||||
programs/xlsatoms
|
|
||||||
programs/xlsclients
|
|
||||||
programs/xlsfonts
|
|
||||||
programs/xmag
|
|
||||||
programs/xmh
|
|
||||||
programs/xmodmap
|
|
||||||
programs/xprop
|
|
||||||
programs/xrdb
|
|
||||||
programs/xrefresh
|
|
||||||
programs/xrx
|
|
||||||
programs/xset
|
|
||||||
programs/xsetroot
|
|
||||||
programs/xsm
|
|
||||||
programs/xstdcmap
|
|
||||||
programs/xterm
|
|
||||||
programs/xwd
|
|
||||||
programs/xwininfo
|
|
||||||
programs/xwud
|
|
Loading…
Reference in a new issue