docs.sheetjs.com/tests/engines-graaljs.sh

39 lines
2.0 KiB
Bash
Raw Permalink Normal View History

2024-05-26 07:50:55 +00:00
#!/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.0.1/js-scriptengine-24.0.1.jar"
curl -LO "https://repo1.maven.org/maven2/org/graalvm/js/js-language/24.0.1/js-language-24.0.1.jar"
curl -LO "https://repo1.maven.org/maven2/org/graalvm/polyglot/polyglot/24.0.1/polyglot-24.0.1.jar"
curl -LO "https://repo1.maven.org/maven2/org/graalvm/sdk/collections/24.0.1/collections-24.0.1.jar"
curl -LO "https://repo1.maven.org/maven2/org/graalvm/truffle/truffle-api/24.0.1/truffle-api-24.0.1.jar"
curl -LO "https://repo1.maven.org/maven2/org/graalvm/sdk/nativeimage/24.0.1/nativeimage-24.0.1.jar"
curl -LO "https://repo1.maven.org/maven2/org/graalvm/shadowed/icu4j/24.0.1/icu4j-24.0.1.jar"
curl -LO "https://repo1.maven.org/maven2/org/graalvm/regex/regex/24.0.1/regex-24.0.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..22}; do
2024-06-03 00:59:49 +00:00
export JAVA_HOME=`/usr/libexec/java_home -v $n`
java -version
rm -fr SheetJSNashorn.class SheetJSNashorn.jar sheethorn
javac SheetJSNashorn.java
2024-05-26 07:50:55 +00:00
java -cp ".:js-scriptengine-24.0.1.jar:js-language-24.0.1.jar:polyglot-24.0.1.jar:collections-24.0.1.jar:truffle-api-24.0.1.jar:nativeimage-24.0.1.jar:icu4j-24.0.1.jar:regex-24.0.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.0.1.jar:js-language-24.0.1.jar:polyglot-24.0.1.jar:collections-24.0.1.jar:truffle-api-24.0.1.jar:nativeimage-24.0.1.jar:icu4j-24.0.1.jar:regex-24.0.1.jar:SheetJSNashorn.jar" -Dpolyglot.js.nashorn-compat=true SheetJSNashorn pres.xlsx
cd -
2024-06-25 07:16:41 +00:00
done