39 lines
2.0 KiB
Bash
Executable File
39 lines
2.0 KiB
Bash
Executable File
#!/bin/bash
|
|
# https://docs.sheetjs.com/docs/demos/engines/graaljs
|
|
cd /tmp
|
|
rm -rf sheetjs-graaljs
|
|
mkdir -p sheetjs-graaljs
|
|
cd sheetjs-graaljs
|
|
|
|
curl -LO "https://repo1.maven.org/maven2/org/graalvm/js/js-scriptengine/24.1.1/js-scriptengine-24.1.1.jar"
|
|
curl -LO "https://repo1.maven.org/maven2/org/graalvm/js/js-language/24.1.1/js-language-24.1.1.jar"
|
|
curl -LO "https://repo1.maven.org/maven2/org/graalvm/polyglot/polyglot/24.1.1/polyglot-24.1.1.jar"
|
|
curl -LO "https://repo1.maven.org/maven2/org/graalvm/sdk/collections/24.1.1/collections-24.1.1.jar"
|
|
curl -LO "https://repo1.maven.org/maven2/org/graalvm/truffle/truffle-api/24.1.1/truffle-api-24.1.1.jar"
|
|
curl -LO "https://repo1.maven.org/maven2/org/graalvm/sdk/nativeimage/24.1.1/nativeimage-24.1.1.jar"
|
|
curl -LO "https://repo1.maven.org/maven2/org/graalvm/shadowed/icu4j/24.1.1/icu4j-24.1.1.jar"
|
|
curl -LO "https://repo1.maven.org/maven2/org/graalvm/regex/regex/24.1.1/regex-24.1.1.jar"
|
|
|
|
curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js
|
|
curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/shim.min.js
|
|
curl -LO https://sheetjs.com/pres.xlsx
|
|
|
|
curl -LO https://docs.sheetjs.com/nashorn/SheetJSNashorn.java
|
|
|
|
for n in {17..23}; do
|
|
export JAVA_HOME=`/usr/libexec/java_home -v $n`
|
|
java -version
|
|
rm -fr SheetJSNashorn.class SheetJSNashorn.jar sheethorn
|
|
javac SheetJSNashorn.java
|
|
|
|
java -cp ".:js-scriptengine-24.1.1.jar:js-language-24.1.1.jar:polyglot-24.1.1.jar:collections-24.1.1.jar:truffle-api-24.1.1.jar:nativeimage-24.1.1.jar:icu4j-24.1.1.jar:regex-24.1.1.jar" -Dpolyglot.js.nashorn-compat=true SheetJSNashorn pres.xlsx
|
|
|
|
jar -cf SheetJSNashorn.jar SheetJSNashorn.class xlsx.full.min.js shim.min.js
|
|
|
|
mkdir -p sheethorn
|
|
cp *.jar pres.xlsx sheethorn
|
|
cd sheethorn
|
|
java -cp ".:js-scriptengine-24.1.1.jar:js-language-24.1.1.jar:polyglot-24.1.1.jar:collections-24.1.1.jar:truffle-api-24.1.1.jar:nativeimage-24.1.1.jar:icu4j-24.1.1.jar:regex-24.1.1.jar:SheetJSNashorn.jar" -Dpolyglot.js.nashorn-compat=true SheetJSNashorn pres.xlsx
|
|
cd -
|
|
done
|