diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2013-03-11 14:15:46 +0100 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2013-03-21 09:30:35 +0100 |
commit | 790a576ad15ba101df27ac0986927d102c4c514d (patch) | |
tree | 450e992a932be406e4414d1998d952f2d21629ac /install/ui/util | |
parent | be54d1deb5e40945e4ead5b34d9acde88c1e8264 (diff) | |
download | freeipa-790a576ad15ba101df27ac0986927d102c4c514d.tar.gz freeipa-790a576ad15ba101df27ac0986927d102c4c514d.tar.xz freeipa-790a576ad15ba101df27ac0986927d102c4c514d.zip |
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
Diffstat (limited to 'install/ui/util')
-rwxr-xr-x | install/ui/util/uglifyjs/uglify | 8 |
1 files changed, 7 insertions, 1 deletions
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 |