From fc20dc69f99469b01d5104038070a035b3ef5124 Mon Sep 17 00:00:00 2001 From: Mikhail Tergoev Date: Fri, 4 Oct 2024 10:56:35 +0300 Subject: [PATCH] added a minimal check for the correctness of writing scripts for auto-installing --- data_from_portwine/scripts/start.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/data_from_portwine/scripts/start.sh b/data_from_portwine/scripts/start.sh index 3fba502..4a067ed 100755 --- a/data_from_portwine/scripts/start.sh +++ b/data_from_portwine/scripts/start.sh @@ -714,6 +714,7 @@ else done < "$ai_file" IFS=$'\n' + [[ -z "$AI_NAME" ]] && yad_error "Line: \"name\" not found in file $AI_FILE." case $AI_TYPE in games) PW_GENERATE_BUTTONS_GAMES+="--field= $AI_NAME!$PW_GUI_ICON_PATH/$AI_IMAGE.png!$AI_INFO:FBTNR%@bash -c \"button_click --normal $AI_FILE\"%" @@ -723,6 +724,9 @@ else PW_GENERATE_BUTTONS_EMULS+="--field= $AI_NAME!$PW_GUI_ICON_PATH/$AI_IMAGE.png!$AI_INFO:FBTNR%@bash -c \"button_click --normal $AI_FILE\"%" (( AI_AMOUNT_EMULS++ )) ;; + *) + yad_error "Line: \"type\" not found in file $AI_FILE or misspelled." + ;; esac [[ -z $PW_DEBUG ]] && unset AI_FILE AI_TYPE AI_NAME AI_IMAGE AI_INFO done