8272113: Build compare script fails with differences in classlist

Reviewed-by: tschatzl, hseigel
This commit is contained in:
Ioi Lam 2021-08-09 15:50:10 +00:00
parent 2f7a46934c
commit 272fcb423a

View File

@ -362,8 +362,14 @@ compare_general_files() {
THIS_FILE=$WORK_DIR/$f.this
$MKDIR -p $(dirname $OTHER_FILE) $(dirname $THIS_FILE)
$RM $OTHER_FILE $THIS_FILE
$CAT $OTHER_DIR/$f | $SORT > $OTHER_FILE
$CAT $THIS_DIR/$f | $SORT > $THIS_FILE
# Also filter out the "id: NNNN" in the classlists
if [[ "$f" = *"/lib/classlist" ]]; then
$CAT $OTHER_DIR/$f | $SORT | $SED "s| id: .*||g" > $OTHER_FILE
$CAT $THIS_DIR/$f | $SORT | $SED "s| id: .*||g" > $THIS_FILE
else
$CAT $OTHER_DIR/$f | $SORT > $OTHER_FILE
$CAT $THIS_DIR/$f | $SORT > $THIS_FILE
fi
else
OTHER_FILE=$OTHER_DIR/$f
THIS_FILE=$THIS_DIR/$f