Skip to content

Instantly share code, notes, and snippets.

@csauve
Created February 18, 2018 07:41
Show Gist options
  • Save csauve/b2ae27131ec78a2cc2d7c9fd6d5daa51 to your computer and use it in GitHub Desktop.
Save csauve/b2ae27131ec78a2cc2d7c9fd6d5daa51 to your computer and use it in GitHub Desktop.
#!/bin/sh
set -ex
mkdir -p /opt/jdk
tar zxvf jdk.tar.gz -C /opt/jdk --strip-components=1
rm jdk.tar.gz
rm /opt/jdk/lib/src.zip
/opt/jdk/bin/jlink \
--module-path /opt/jdk/jmods \
--add-modules "$(cat jmods.txt | tr '\n' ',')" \
--compress 2 \
--no-man-pages \
--strip-debug \
--vm server \
--no-header-files \
--output $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment