More work on the new launch system.

This commit is contained in:
Storm Dragon 2024-12-21 13:43:22 -05:00
parent ca2b6df08f
commit d29523316d

View File

@ -398,6 +398,9 @@ game_installer() {
exit 1
fi
fi
if [[ -e "${0%/*}/.launch/${game}.game" ]] && ! [[ -L "${0%/*}/.launch/${game.sh}" ]]; then
ln -srf "${0%/*}/.launch/${game}.game" "${0%/*}/.launch/${game}.sh"
fi
exit 0
}
@ -443,7 +446,7 @@ game_removal() {
--yesno "This will remove the directory \"${game%/*}\" and all of its contents. Do you want to continue?." -1 -1 --stdout || exit 0
fi
export noRemove
{ [ "$noRemove" == "no" ] && rm -rfv "${game%/*}";
{ [[ "$noRemove" == "no" ]] && rm -rfv "${game%/*}";
sed -i "/${game//\//\\/}/d" "$configFile"; } | dialog --backtitle "Linux Game Manager" --progressbox "Removing game..." -1 -1
exit 0
}
@ -493,10 +496,11 @@ game_launcher() {
if [[ -d ".launch" ]]; then
find "${0%/*}/.launch" -maxdepth 1 -type f -iname "*.sh" -exec bash -c '
for f; do
name="${f##*/}"
echo "${name%.sh}|$f"
[[ $(head -n1 "$f") == "#"* ]] && continue
name="${f##*/}"
echo "${name%.sh}|$f"
done
' bash {} \;
' _ {} \;
fi
)
# Add all entries to menu