supress error messages for nonexistent files.
This commit is contained in:
parent
5650414e3c
commit
9e19062cc9
@ -313,7 +313,7 @@ game_launcher() {
|
|||||||
--no-tags \
|
--no-tags \
|
||||||
--menu "Please select a game to play" 0 0 0 "${menuList[@]}" --stdout)"
|
--menu "Please select a game to play" 0 0 0 "${menuList[@]}" --stdout)"
|
||||||
else
|
else
|
||||||
local game="$(grep "^${1}|" "${configFile}")"
|
local game="$(grep "^${1}|" "${configFile}" 2> /dev/null)"
|
||||||
game="${game%|*}"
|
game="${game%|*}"
|
||||||
if [[ -z "$game" ]]; then
|
if [[ -z "$game" ]]; then
|
||||||
echo "Game $1 not found."
|
echo "Game $1 not found."
|
||||||
@ -368,7 +368,7 @@ game_launcher() {
|
|||||||
add_launcher() {
|
add_launcher() {
|
||||||
local launchSettings="${game,,}"
|
local launchSettings="${game,,}"
|
||||||
launchSettings="${launchSettings//[[:space:]]/-}|${1}|${game}"
|
launchSettings="${launchSettings//[[:space:]]/-}|${1}|${game}"
|
||||||
if ! grep -F -q -x "${launchSettings}" "${configFile}" ; 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}"
|
||||||
# Remove .lnk files because they don't work.
|
# Remove .lnk files because they don't work.
|
||||||
|
Loading…
Reference in New Issue
Block a user