1.1 --- a/common/bin/compare.sh Wed Nov 28 13:15:56 2012 +0100 1.2 +++ b/common/bin/compare.sh Wed Nov 28 13:40:17 2012 +0100 1.3 @@ -290,6 +290,7 @@ 1.4 for f in $GENERAL_FILES 1.5 do 1.6 if [ -e $OTHER_DIR/$f ]; then 1.7 + SUFFIX="${f##*.}" 1.8 if [ "$(basename $f)" = "release" ]; then 1.9 # Ignore differences in change numbers in release file. 1.10 OTHER_FILE=$WORK_DIR/$f.other 1.11 @@ -298,6 +299,22 @@ 1.12 $MKDIR -p $(dirname $THIS_FILE) 1.13 $CAT $OTHER_DIR/$f | $SED 's/\:[0-9a-f]\{12,12\}/:CHANGE/g' > $OTHER_FILE 1.14 $CAT $THIS_DIR/$f | $SED 's/\:[0-9a-f]\{12,12\}/:CHANGE/g' > $THIS_FILE 1.15 + elif [ "x$SUFFIX" = "xhtml" ]; then 1.16 + # Ignore time stamps in docs files 1.17 + OTHER_FILE=$WORK_DIR/$f.other 1.18 + THIS_FILE=$WORK_DIR/$f.this 1.19 + $MKDIR -p $(dirname $OTHER_FILE) 1.20 + $MKDIR -p $(dirname $THIS_FILE) 1.21 + $CAT $OTHER_DIR/$f | $SED -e 's/\(-- Generated by javadoc \).*\( --\)/\1(removed)\2/' \ 1.22 + -e 's/\(<meta name="date" content="\).*\(">\)/\1(removed)\2/' \ 1.23 + -e 's/\(Monday\|Tuesday\|Wednesday\|Thursday\|Friday\|Saturday\|Sunday\), [A-Z][a-z]* [0-9][0-9]*, [12][0-9]* [0-9][0-9:]* \(AM\|PM\) [A-Z][A-Z]*/(removed)/' \ 1.24 + -e 's/^\( from \).*\(\.idl\)$/\1(removed)\2/' \ 1.25 + > $OTHER_FILE 1.26 + $CAT $THIS_DIR/$f | $SED -e 's/\(-- Generated by javadoc \).*\( --\)/\1(removed)\2/' \ 1.27 + -e 's/\(<meta name="date" content="\).*\(">\)/\1(removed)\2/' \ 1.28 + -e 's/\(Monday\|Tuesday\|Wednesday\|Thursday\|Friday\|Saturday\|Sunday\), [A-Z][a-z]* [0-9][0-9]*, [12][0-9]* [0-9][0-9:]* \(AM\|PM\) [A-Z][A-Z]*/(removed)/' \ 1.29 + -e 's/^\( from \).*\(\.idl\)$/\1(removed)\2/' \ 1.30 + > $THIS_FILE 1.31 else 1.32 OTHER_FILE=$OTHER_DIR/$f 1.33 THIS_FILE=$THIS_DIR/$f 1.34 @@ -1111,6 +1128,22 @@ 1.35 echo "Skipping bundle compare!" 1.36 fi 1.37 1.38 +if [ -d "$THIS/docs" ]; then 1.39 + THIS_DOCS="$THIS/docs" 1.40 +fi 1.41 + 1.42 +if [ -d "$OTHER/docs" ]; then 1.43 + OTHER_DOCS="$OTHER/docs" 1.44 +fi 1.45 + 1.46 +if [ -z "$THIS_DOCS" ]; then 1.47 + echo "WARNING! Docs haven't been built and won't be compared." 1.48 +fi 1.49 + 1.50 +if [ -z "$OTHER_DOCS" ]; then 1.51 + echo "WARNING! Other build doesn't contain docs, skipping doc compare." 1.52 +fi 1.53 + 1.54 ########################################################################################## 1.55 # Do the work 1.56 1.57 @@ -1148,6 +1181,12 @@ 1.58 echo -n "J2RE Bundle " 1.59 compare_files $THIS_J2RE_BUNDLE $OTHER_J2RE_BUNDLE $COMPARE_ROOT/j2re-bundle 1.60 fi 1.61 + if [ -n "$THIS_DOCS" ] && [ -n "$OTHER_DOCS" ]; then 1.62 + echo -n "Docs " 1.63 + compare_dirs $THIS_DOCS $OTHER_DOCS $COMPARE_ROOT/docs 1.64 + echo -n "Docs " 1.65 + compare_files $THIS_DOCS $OTHER_DOCS $COMPARE_ROOT/docs 1.66 + fi 1.67 fi 1.68 1.69 if [ "$CMP_PERMS" = "true" ]; then 1.70 @@ -1211,6 +1250,10 @@ 1.71 echo -n "J2RE Bundle " 1.72 compare_general_files $THIS_J2RE_BUNDLE $OTHER_J2RE_BUNDLE $COMPARE_ROOT/j2re-bundle 1.73 fi 1.74 + if [ -n "$THIS_DOCS" ] && [ -n "$OTHER_DOCS" ]; then 1.75 + echo -n "Docs " 1.76 + compare_general_files $THIS_DOCS $OTHER_DOCS $COMPARE_ROOT/docs 1.77 + fi 1.78 fi 1.79 1.80 if [ "$CMP_ZIPS" = "true" ]; then