From 741b430c03a35f547c294fdced90c6371e015080 Mon Sep 17 00:00:00 2001 From: bruno Date: Tue, 16 May 2023 17:02:15 -0400 Subject: [PATCH] Script que verifica a sintaxe do php verifica_sintaxe_php.sh --- .gitignore | 3 +++ verifica_sintaxe_php.sh | 15 +++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 verifica_sintaxe_php.sh diff --git a/.gitignore b/.gitignore index 72060164..31e8d86c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,6 @@ cadastro/licenca/*.lca cadastro/licenca/tmp/*.lca nbproject audios + +# Resultado do script para verificar sintaxe php +sintaxe_error diff --git a/verifica_sintaxe_php.sh b/verifica_sintaxe_php.sh new file mode 100644 index 00000000..daea834a --- /dev/null +++ b/verifica_sintaxe_php.sh @@ -0,0 +1,15 @@ +#!/bin/bash + + +file_error="sintaxe_error" +path_file=$(find /var/www/html/aplicativo/ -type f |grep -E ".*\.php$") + +echo > $file_error + +for file in $path_file +do + php -lf $file > /dev/null 2>> $file_error + +done + +echo "----> $file_error"