First pass at dependency checking for games.

This commit is contained in:
Storm Dragon 2022-07-22 02:20:17 -04:00
parent 567705accc
commit 18c4790ddb

View File

@ -77,6 +77,25 @@ check_architecture() {
exit 1
}
# Check dependencies required for games
check_dependencies() {
local dependencies
for i in "${@}"; do
if ! command -v "$i" > /dev/null 2>&1 ; then
dependencies+=("$i")
fi
done
if [[ "${#dependencies[@]}" -eq 0 ]]; then
return
fi
echo "missing dependencies. Please install the following:"
echo
for i in "${dependencies[@]}" ; do
echo "$i"
done
exit 1
}
# Function to open a terminal emulator
terminal_emulator() {
terminals=(
@ -415,6 +434,7 @@ case "${game}" in
--infobox "${game} is a web based game and does not need to be installed." -1 -1
;;
"Alter Aeon")
check_dependencies git sox tt++
git -C "${installPath}/" clone --recurse-submodules https://github.com/lilmike/tintin-alteraeon.git | \
dialog --progressbox "Installing \"${game}\", please wait..." -1 -1
add_launcher "${installPath}/tintin-alteraeon/aa.tin"
@ -455,11 +475,13 @@ case "${game}" in
add_launcher "${installPath}/E.X.O./EXO"
;;
"EmpireMUD")
check_dependencies git sox tt++
git -C "${installPath}/" clone --recurse-submodules https://github.com/lilmike/tintin-empiremud.git | \
dialog --progressbox "Installing \"${game}\", please wait..." -1 -1
add_launcher "${installPath}/tintin-empiremud/em.tin"
;;
"End of Time")
check_dependencies git opusdec sox tt++
git -C "${installPath}/" clone https://git.2mb.codes/~stormdragon2976/tintin-endoftime | \
dialog --progressbox "Installing \"${game}\", please wait..." -1 -1
add_launcher "${installPath}/tintin-endoftime/eot.tin"
@ -502,6 +524,7 @@ case "${game}" in
add_launcher "${installPath}/soundStrider/soundStrider"
;;
"StickMUD")
check_dependencies git sox tt++
git -C "${installPath}/" clone --recurse-submodules https://github.com/stormdragon2976/tintin-stickmud.git | \
dialog --progressbox "Installing \"${game}\", please wait..." -1 -1
add_launcher "${installPath}/tintin-stickmud/stickmud.tin"