Commit fc20dc69 authored by Mikhail Tergoev's avatar Mikhail Tergoev

added a minimal check for the correctness of writing scripts for auto-installing

parent b0932e5f
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment