Updated the add_launcher function to handle extra parameters.

This commit is contained in:
Storm Dragon 2024-09-12 14:37:51 -04:00
parent c77f05b86a
commit c012cb5574

View File

@ -1050,6 +1050,11 @@ game_launcher() {
add_launcher() { add_launcher() {
local launchSettings="${game,,}" local launchSettings="${game,,}"
launchSettings="${launchSettings//[[:space:]]/-}|${1}|${game}" launchSettings="${launchSettings//[[:space:]]/-}|${1}|${game}"
shift
while [[ $# -gt 0 ]]; do
launchSettings+="|$1"
shift
done
if ! grep -F -q -x "${launchSettings}" "${configFile}" 2> /dev/null ; then if ! grep -F -q -x "${launchSettings}" "${configFile}" 2> /dev/null ; then
echo "${launchSettings}" >> "${configFile}" echo "${launchSettings}" >> "${configFile}"
sort -o "${configFile}" "${configFile}" sort -o "${configFile}" "${configFile}"