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
|
|
|
|
|
2024-12-18 05:47:18 +00:00
|
|
|
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"
|
2024-05-26 07:50:55 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2024-12-18 05:47:18 +00:00
|
|
|
for n in {17..23}; 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
|
|
|
|
2024-12-18 05:47:18 +00:00
|
|
|
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
|
2024-05-26 07:50:55 +00:00
|
|
|
|
|
|
|
jar -cf SheetJSNashorn.jar SheetJSNashorn.class xlsx.full.min.js shim.min.js
|
|
|
|
|
|
|
|
mkdir -p sheethorn
|
|
|
|
cp *.jar pres.xlsx sheethorn
|
|
|
|
cd sheethorn
|
2024-12-18 05:47:18 +00:00
|
|
|
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
|
2024-05-26 07:50:55 +00:00
|
|
|
cd -
|
2024-06-25 07:16:41 +00:00
|
|
|
done
|