Created
April 3, 2024 21:47
-
-
Save clintval/bc760c2227b373a1957a23d2e551984d to your computer and use it in GitHub Desktop.
Revisions
-
clintval created this gist
Apr 3, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,28 @@ { cat <<- EOM #!/usr/bin/env sh set -e PROP_OPTS=() MEM_OPTS=() PASS_ARGS=() DEFAULT_MEM_OPTS=('-Xms512m' '-XX:+AggressiveHeap') for ARG in "\$@"; do case \$ARG in '-D'* | '-XX'*) PROP_OPTS+=("\$ARG");; '-Xm'*) MEM_OPTS+=("\$ARG");; *) PASS_ARGS+=("\$ARG");; esac done if [ -z "\${_JAVA_OPTIONS}" ] && [ -z "\${JAVA_OPTS}" ] && [ -z "\${MEM_OPTS}" ]; then MEM_OPTS=("\${DEFAULT_MEM_OPTS[*]}"); fi exec java \${JAVA_OPTS} \${MEM_OPTS[*]} \${PROP_OPTS[*]} -jar "\$0" \${PASS_ARGS[*]} exit EOM cat /path/to/your/custom/build/project.jar } > project && chmod 775 project