Created
April 12, 2020 00:36
-
-
Save Markkop/517cb706f39ac64e2b13f736d79cf6ae to your computer and use it in GitHub Desktop.
Change Wakfu config to use it own Java version
This file contains 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 characters
echo "Starting..." | |
if [ ! -d jre/linux/x64/bin ] | |
then | |
echo "no ./jre/linux/x64/bin folder found" | |
exit | |
fi | |
chmod u+x jre/linux/x64/bin/* | |
if [ ! -f zaap-start.sh ] | |
then | |
echo "no ./zaap-start.sh file found" | |
exit | |
fi | |
mv zaap-start.sh zaap-start_bkp.sh | |
{ | |
# Try: | |
sed -e 's@java ${java_xms} ${java_xmx} ${java_options}@./jre/linux/x64/bin/java ${java_xms} ${java_xmx} ${java_options}@g' zaap-start_bkp.sh > zaap-start.sh | |
} || { | |
# On error: | |
echo "Replacing string didn't work, restoring backup" | |
cp zaap-start_bkp.sh zaap-start.sh | |
} | |
echo "Finished." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment