8141439: Fix compare.sh -o <otherdir> (broken by JDK-8136813)
Reviewed-by: tbell, erikj
--- a/common/autoconf/compare.sh.in Wed Nov 04 12:45:55 2015 +0100
+++ b/common/autoconf/compare.sh.in Thu Nov 05 10:58:53 2015 +0100
@@ -86,4 +86,6 @@
$RM $OUTPUT_ROOT/compare.log.old 2> /dev/null
$MV $OUTPUT_ROOT/compare.log $OUTPUT_ROOT/compare.log.old 2> /dev/null
+export SCRIPT_DIR="$( cd "$( dirname "$0" )" > /dev/null && pwd )"
+
$BASH $SRC_ROOT/common/bin/logger.sh $OUTPUT_ROOT/compare.log $BASH "$REAL_COMPARE_SCRIPT" "$@"
--- a/common/bin/compare.sh Wed Nov 04 12:45:55 2015 +0100
+++ b/common/bin/compare.sh Thu Nov 05 10:58:53 2015 +0100
@@ -989,7 +989,7 @@
fi
fi
-THIS="$( cd "$( dirname "$0" )" > /dev/null && pwd )"
+THIS="$SCRIPT_DIR"
echo "$THIS"
THIS_SCRIPT="$0"