1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
|
#!/bin/csh -f
#
# PACT-CHANGES - list pact changes in package header files
# - using ideas from Carolyn Sharp's original
#
#
# Modification History:
# 08-16-94 Jan Moura, LLNL: Extended prolog
####################
# Source Version: 2.0
# Software Release #92-0043
#
# include "cpyright.h"
#
# see PCD for the reason for this
set Here = `pwd` ; cd ; set RealHome = `pwd` ; cd $Here ; unset $Here
set Old = $1
set New = `pwd | sed "s|$RealHome|$home|"`
set Pck = $New:t
set DiffFile = $Pck.changes
set First = TRUE
set TmpHdr = ._tmp_.hdr
set TmpDif = ._tmp_.dif
if ($Pck == "ultra") then
exit(0)
endif
set Vers = `awk '($1 == "#define") && ($2 == "VERSION") {print $3}' $Old/score.h`
set OldVersion = "old Version $Vers"
if (-d ../score) then
set Vers = `awk '($1 == "#define") && ($2 == "VERSION") {print $3}' ../score/score.h`
else
set Vers = "`./code-date` (local)"
endif
set NewVersion = "new Version $Vers"
shift
rm -f $TmpHdr $DiffFile
echo " " >>& $TmpHdr
echo "Interface changes for PACT package: $Pck" >>& $TmpHdr
echo " " >>& $TmpHdr
echo "Legend: < corresponds to $OldVersion in $Old" >>& $TmpHdr
echo " > corresponds to $NewVersion to be installed" >>& $TmpHdr
echo " " >>& $TmpHdr
rm -f $TmpDif
foreach hdr ($argv)
diff $Old/$hdr $New/$hdr >>& $TmpDif
if ($status > 0) then
if ($First == "TRUE") then
cat $TmpHdr >>& $DiffFile
set First = FALSE
endif
echo " " >>& $DiffFile
echo "===============================================================" >>& $DiffFile
echo " $hdr" >>& $DiffFile
echo "===============================================================" >>& $DiffFile
echo " " >>& $DiffFile
cat $TmpDif >>& $DiffFile
endif
rm -f $TmpDif
end
rm -f $TmpHdr
if ($First == "FALSE") then
echo " " >>& $DiffFile
echo "===============================================================" >>& $DiffFile
echo " " >>& $DiffFile
endif
# if (-e $DiffFile) then
# cat $DiffFile
# endif
exit($status)
|