declare -a errorList declare -a packageList if [[ $# -eq 0 ]]; then echo "Checking your system..." echo fi if command -v wine &> /dev/null ; then [[ $# -eq 0 ]] && echo "Wine is installed." else errorList+=("Critical: Wine is not installed. You will not be able to play any games.") fi packageList+=("wine") if command -v curl &> /dev/null ; then [[ $# -eq 0 ]] && echo "Curl is installed." else errorList+=("Critical: Curl is not installed. Critical functionality will not work.") fi packageList+=("curl") if command -v dialog &> /dev/null ; then [[ $# -eq 0 ]] && echo "Dialog is installed." else errorList+=("Critical: Dialog is not installed. You will not be able to install, launch, or remove any games.") fi packageList+=("dialog") for i in 7z cabextract unzip xz ; do if command -v $i &> /dev/null ; then [[ $# -eq 0 ]] && echo "${i^} is installed." else errorList+=("Critical: ${i^} is not installed. You will not be able to install some games or their components.") fi packageList+=("$i") done if command -v gawk &> /dev/null ; then [[ $# -eq 0 ]] && echo "Gawk is installed." else errorList+=("Warning: gawk is not installed. Game removal with -r will not work.") fi packageList+=("gawk") if command -v ocrdesktop &> /dev/null ; then [[ $# -eq 0 ]] && echo "Ocrdesktop is installed." else errorList+=("Warning: ocrdesktop is not installed. It can help if the installer gets stuck to figure out what is happening.") fi packageList+=("ocrdesktop") if command -v qjoypad &> /dev/null ; then [[ $# -eq 0 ]] && echo "Qjoypad is installed." else errorList+=("Warning: qjoypad is not installed. Qjoypad allows you to play keyboard only games with a gamepad.") fi packageList+=("qjoypad") if command -v sox &> /dev/null ; then [[ $# -eq 0 ]] && echo "Sox is installed." else errorList+=("Warning: Sox is not installed. Audio will not work.") fi packageList+=("sox") if command -v trans &> /dev/null ; then [[ $# -eq 0 ]] && echo "Translate-shell is installed." else errorList+=("Warning: translate-shell is not installed. Games that require translation will not be translated.") fi packageList+=("translate-shell") if command -v sqlite3 &> /dev/null ; then [[ $# -eq 0 ]] && echo "Sqlite3 is installed." else errorList+=("Warning: sqlite is not installed. Required for games that need to be translated.") fi if command -v perl &> /dev/null ; then [[ $# -eq 0 ]] && echo "Perl is installed." else errorList+=("Warning: perl is not installed. Required for games that need to be translated.") fi packageList+=("perl") packageList+=("sqlite") if command -v w3m &> /dev/null ; then [[ $# -eq 0 ]] && echo "W3m is installed." else errorList+=("Warning: w3m is not installed. W3m is used to view game documentation.") fi packageList+=("w3m") if command -v xclip &> /dev/null ; then [[ $# -eq 0 ]] && echo "Xclip is installed." else errorList+=("Warning: Xclip is not installed. Some games may not speak or register properly.") fi packageList+=("xclip") if command -v xdotool &> /dev/null ; then [[ $# -eq 0 ]] && echo "Xdotool is installed." else errorList+=("Warning: Xdotool is not installed. Some installers may not work or may need manual intervention.") fi packageList+=("xdotool") # Show the results if [[ $# -ne 0 ]]; then for i in "${packageList[@]}" ; do echo "$i" done | sort exit 0 fi if [[ ${#errorList[@]} -eq 0 ]]; then echo "No problems found, you are good to go." exit 0 fi echo "Errors detected, here is a list along with the severity." echo "Note that errors marked critical mean that you will not be able to install and play games until they are resolved." for i in "${errorList[@]}" ; do echo "$i" done exit 0