From 790a576ad15ba101df27ac0986927d102c4c514d Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Mon, 11 Mar 2013 14:15:46 +0100 Subject: Fixed Web UI build error caused by rhino changes in F19 rhino-1.7R4-2.fc19.noarch dropped -main flag which made the build fail in rawhide (F19). We can't use the same command for rhino-1.7R3-6 (F18) and rhino-1.7R4-2 (F19). This patch adds check if rhino supports '-require' option. If so it calls rhino with it if not it calls rhino with -main option. https://fedorahosted.org/freeipa/ticket/3501 --- install/ui/util/uglifyjs/uglify | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'install/ui/util') diff --git a/install/ui/util/uglifyjs/uglify b/install/ui/util/uglifyjs/uglify index 50dfb51d..7d25b38d 100755 --- a/install/ui/util/uglifyjs/uglify +++ b/install/ui/util/uglifyjs/uglify @@ -23,4 +23,10 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -rhino -main $DIR/uglify-js.js $DIR/ug.js $1 $2 -v \ No newline at end of file +# rhino-1.7R4 doesn't have -main option to enable CommonJS support. It was +# replaced by -require option. +if [ `rhino --help | grep -e -require | wc -l` -gt 0 ] ; then + rhino -require $DIR/uglify-js.js $@ +else + rhino -main $DIR/uglify-js.js $DIR/ug.js $@ +fi \ No newline at end of file -- cgit