More work on the new launch system.
This commit is contained in:
parent
ca2b6df08f
commit
d29523316d
@ -398,6 +398,9 @@ game_installer() {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
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
|
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
|
--yesno "This will remove the directory \"${game%/*}\" and all of its contents. Do you want to continue?." -1 -1 --stdout || exit 0
|
||||||
fi
|
fi
|
||||||
export noRemove
|
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
|
sed -i "/${game//\//\\/}/d" "$configFile"; } | dialog --backtitle "Linux Game Manager" --progressbox "Removing game..." -1 -1
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
@ -493,10 +496,11 @@ game_launcher() {
|
|||||||
if [[ -d ".launch" ]]; then
|
if [[ -d ".launch" ]]; then
|
||||||
find "${0%/*}/.launch" -maxdepth 1 -type f -iname "*.sh" -exec bash -c '
|
find "${0%/*}/.launch" -maxdepth 1 -type f -iname "*.sh" -exec bash -c '
|
||||||
for f; do
|
for f; do
|
||||||
name="${f##*/}"
|
[[ $(head -n1 "$f") == "#"* ]] && continue
|
||||||
echo "${name%.sh}|$f"
|
name="${f##*/}"
|
||||||
|
echo "${name%.sh}|$f"
|
||||||
done
|
done
|
||||||
' bash {} \;
|
' _ {} \;
|
||||||
fi
|
fi
|
||||||
)
|
)
|
||||||
# Add all entries to menu
|
# Add all entries to menu
|
||||||
|
Loading…
Reference in New Issue
Block a user