From 7373685e2a631ec7f54d8d6aebbc90ead8c07c0b Mon Sep 17 00:00:00 2001 From: sasha80 Date: Wed, 21 Jan 2026 10:23:00 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=BA=D0=B0.=20=D0=92=D1=81=D1=82=D1=80=D0=B0=D0=B8=D0=B2?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D0=B5=20=D1=81=D1=82=D0=B0=D1=82=D0=B8=D1=87?= =?UTF-8?q?=D0=B5=D1=81=D0=BA=D0=BE=D0=B9=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5?= =?UTF-8?q?=D1=80=D0=BA=D0=B8=20=D0=B8=D1=81=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7?= =?UTF-8?q?=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F=20=D0=BA=D0=B0=D0=B2=D1=8B?= =?UTF-8?q?=D1=87=D0=B5=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + check.sh | 16 ++++++++++------ git-hook.sh | 1 + ip-tables-navigation.sh | 1 - 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index a6146d7f..3cb4a5c7 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,4 @@ modbus/serial/__pycache__ /scenes/pribor-prd-n/kasseta-fs-nd.tscn.bak *.patch +проверка.log diff --git a/check.sh b/check.sh index 2f104301..72c43c7b 100644 --- a/check.sh +++ b/check.sh @@ -50,10 +50,12 @@ while IFS= read -r file; do # Удаляем начальные и конечные пробелы gsub(/^[[:space:]]+|[[:space:]]+$/, "", line) - # Ищем непустые строки с двойными кавычками - if (line ~ /"[^"\\]*"/) { - print line_num ": " original_line - } + if (index(original_line, "\"\"\"") > 0) { + # Ищем непустые строки с двойными кавычками + if (line ~ /"[^"\\]*"/) { + print line_num ": " original_line + } + } } ' "$file") @@ -65,8 +67,10 @@ while IFS= read -r file; do done echo "" fi -done < <(find "$TARGET_DIR" -type f -name "*.gd") +done < <(find "$TARGET_DIR" -type f -name "*.gd" -not -path "./addons/*") if [ "$FOUND_MATCHES" -eq 0 ]; then - echo "Совпадений не найдено." + exit 0 fi + +exit 1 diff --git a/git-hook.sh b/git-hook.sh index e38d1643..44ba28d1 100644 --- a/git-hook.sh +++ b/git-hook.sh @@ -20,6 +20,7 @@ # - выполнение фиксации; # - выполнение слияния. +./check.sh . > "проверка.log" GDSCRIPT_FILE="scripts/commit.gd" HEAD="$(git rev-parse --abbrev-ref HEAD) $(git rev-parse --short HEAD) $(git log -1 --format=%cd)" diff --git a/ip-tables-navigation.sh b/ip-tables-navigation.sh index 960abb7e..a3108538 100644 --- a/ip-tables-navigation.sh +++ b/ip-tables-navigation.sh @@ -8,7 +8,6 @@ ## ``` ## > iptables v1.8.2 (nf_tables) - INI_FILE="/opt/5p28/device.ini" ## Путь к INI-файлу 5п28 SECTION_NAME="navigat" ## Название секции INI-файла 5п28 IP_PORT_NAME="port" ## Имя поля INI-файла 5п28 в котором хранится номер порта назначения