diff options
author | Giovanni Santini | 2021-08-09 15:48:51 +0200 |
---|---|---|
committer | Giovanni Santini | 2021-08-09 15:50:26 +0200 |
commit | a427839a01b08041bddb50f5ae408c9d3627b642 (patch) | |
tree | 8846eb724e79a9bab3498c689638108e55fc1f5e /crystal-launcher.sh | |
download | aur-a427839a01b08041bddb50f5ae408c9d3627b642.tar.gz |
addpkg: crystal-launcher
- New package for Crystal Launcher.
Based on the prototype files available in /usr/share/pacman .
Diffstat (limited to 'crystal-launcher.sh')
-rwxr-xr-x | crystal-launcher.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/crystal-launcher.sh b/crystal-launcher.sh new file mode 100755 index 000000000000..d58f853eb35d --- /dev/null +++ b/crystal-launcher.sh @@ -0,0 +1,29 @@ +#!/bin/sh +# Based on: +# https://wiki.archlinux.org/title/Java_package_guidelines + +# Force installation in the standard path +CL_INST_CONF="$HOME/.crystalinst" +if [ ! -f $CL_INST_CONF ] +then + touch "$CL_INST_CONF" + echo "$HOME/Crystal-Launcher" > "$CL_INST_CONF" +fi + +# At the first time set up the proper JREs in the config file +JAVA_8="%JAVA_8%" +JAVA_16="%JAVA_16%" + +CL_CONFIG="`cat $CL_INST_CONF`/config.prop" +if [ ! -f $CL_CONFIG ] +then + touch $CL_CONFIG + echo "customjvmdir_v2.path=/usr/lib/jvm/$JAVA_8/jre/bin/java" > "$CL_CONFIG" + echo "customjvmdir_v2.use=true" >> "$CL_CONFIG" + echo "customjvmdir_v3.path=/usr/lib/jvm/$JAVA_16/bin/java" >> "$CL_CONFIG" + echo "customjvmdir_v3.use=true" >> "$CL_CONFIG" +fi + +# Run the app correctly +exec /usr/bin/java -jar '/usr/share/java/crystal-launcher.jar' "$@" + |