fix settings.cfg and preserve semicolons if present (#369)

This commit is contained in:
Tyler Page 2019-08-02 16:29:22 +00:00 committed by Geoff Bourne
parent e061cc7163
commit 53800e460f

View File

@ -105,7 +105,7 @@ EOF
# patch CurseForge cfg file, if present
if [ -f "${FTB_DIR}/settings.cfg" ]; then
sed -i "/MAX_RAM=.*/ c MAX_RAM=${MAX_MEMORY};" "${FTB_DIR}/settings.cfg"
sed -i "s/MAX_RAM=[^;]*/MAX_RAM=${MAX_MEMORY}/" "${FTB_DIR}/settings.cfg"
fi
cd "${FTB_DIR}"