diff --git a/files/builds/stable-branch/bin/install.sh b/files/builds/stable-branch/bin/install.sh index 6c172d7..a3fb101 100644 --- a/files/builds/stable-branch/bin/install.sh +++ b/files/builds/stable-branch/bin/install.sh @@ -39,8 +39,26 @@ WP_DRIVER="DXVK" # Reset the logfile-value for the installation of Autodesk Fusion 360! SP_FUSION360_CHANGE=0 +REQUIRED_COMMANDS=( + "yad" + "wine" +) + ############################################################################################################################################################### +function SP_CHECK_REQUIRED_COMMANDS { + for cmd in "${REQUIRED_COMMANDS[@]}"; do + echo "Testing presence of ${cmd} ..." + local path="$(command -v "${cmd}")" + if [ -n "${path}" ]; then + echo "Found: ${path}" + else + echo "No ${cmd} found in \$PATH!" + exit 1 + fi + done +} + function SP_STRUCTURE { mkdir -p "$SP_PATH/bin" mkdir -p "$SP_PATH/logs" @@ -1153,6 +1171,7 @@ function SP_COMPLETED { # THE INSTALLATION PROGRAM IS STARTED HERE: # ############################################################################################################################################################### +SP_CHECK_REQUIRED_COMMANDS SP_STRUCTURE SP_LOGFILE_INSTALL SP_LOCALE_INDEX diff --git a/files/builds/stable-branch/bin/uninstall.sh b/files/builds/stable-branch/bin/uninstall.sh index de72521..1516eb4 100644 --- a/files/builds/stable-branch/bin/uninstall.sh +++ b/files/builds/stable-branch/bin/uninstall.sh @@ -20,8 +20,25 @@ # Default-Path: DL_PATH="$HOME/.fusion360" +REQUIRED_COMMANDS=( + "yad" +) + ############################################################################################################################################################### +function SP_CHECK_REQUIRED_COMMANDS { + for cmd in "${REQUIRED_COMMANDS[@]}"; do + echo "Testing presence of ${cmd} ..." + local path="$(command -v "${cmd}")" + if [ -n "${path}" ]; then + echo "Found: ${path}" + else + echo "No ${cmd} found in \$PATH!" + exit 1 + fi + done +} + # Copy the file where the user can see the exits Wineprefixes of Autodesk Fusion 360 on the system. function DL_GET_FILES { mkdir -p "/tmp/fusion360/logs" @@ -204,6 +221,7 @@ function DL_WINEPREFIXES_DEL_INFO { # THE INSTALLATION PROGRAM IS STARTED HERE: # ############################################################################################################################################################### +SP_CHECK_REQUIRED_COMMANDS DL_GET_FILES DL_LOAD_LOCALE DL_WELCOME