annotate bin/js @ 10843:2d5ba2d44680

<Jafet> le/rn double dactyl//Curious spurious verse form, ostensibly catchy to hear but herculean to write. Sadly its bent on the sesquipedalian makes double dactyls pretentious and trite.
author HackBot
date Fri, 28 Apr 2017 02:49:16 +0000
parents 7bf20fcbbe08
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5643
56dcce63901b <tswett> revert
HackBot
parents:
diff changeset
1 #!/bin/sh
56dcce63901b <tswett> revert
HackBot
parents:
diff changeset
2
56dcce63901b <tswett> revert
HackBot
parents:
diff changeset
3 JAVA_CMD="/usr/bin/java"
56dcce63901b <tswett> revert
HackBot
parents:
diff changeset
4 JAVA_OPTS=""
56dcce63901b <tswett> revert
HackBot
parents:
diff changeset
5 JAVA_CLASSPATH="/usr/share/java/js.jar:/usr/share/java/jline.jar"
56dcce63901b <tswett> revert
HackBot
parents:
diff changeset
6 JAVA_MAIN="org.mozilla.javascript.tools.shell.Main"
56dcce63901b <tswett> revert
HackBot
parents:
diff changeset
7
56dcce63901b <tswett> revert
HackBot
parents:
diff changeset
8 ## Fix for #512498
56dcce63901b <tswett> revert
HackBot
parents:
diff changeset
9 ## Change Bootclasspath when using OpenJDK because OpenJDK6
56dcce63901b <tswett> revert
HackBot
parents:
diff changeset
10 ## bundle his own release of Rhino.
56dcce63901b <tswett> revert
HackBot
parents:
diff changeset
11 ## References:
56dcce63901b <tswett> revert
HackBot
parents:
diff changeset
12 ## <https://bugs.launchpad.net/ubuntu/+source/openjdk-6/+bug/255149>
56dcce63901b <tswett> revert
HackBot
parents:
diff changeset
13 ## <http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=179>
56dcce63901b <tswett> revert
HackBot
parents:
diff changeset
14 ## <http://www.openoffice.org/issues/show_bug.cgi?id=91641>
56dcce63901b <tswett> revert
HackBot
parents:
diff changeset
15 isOpenJDK=`$JAVA_CMD -version 2>&1 | grep -i "OpenJDK" | wc -l`
56dcce63901b <tswett> revert
HackBot
parents:
diff changeset
16 if [ $isOpenJDK -gt 0 ]
56dcce63901b <tswett> revert
HackBot
parents:
diff changeset
17 then
56dcce63901b <tswett> revert
HackBot
parents:
diff changeset
18 JAVA_OPTS="-Xbootclasspath:/usr/lib/jvm/java-6-openjdk/jre/lib/rt.jar"
56dcce63901b <tswett> revert
HackBot
parents:
diff changeset
19 fi
56dcce63901b <tswett> revert
HackBot
parents:
diff changeset
20
56dcce63901b <tswett> revert
HackBot
parents:
diff changeset
21
10343
7bf20fcbbe08 <fizzie> sled bin/js//s,\\$@,$*,
HackBot
parents: 5643
diff changeset
22 $JAVA_CMD -classpath $JAVA_CLASSPATH $JAVA_MAIN -e "$*"