From bebba24c6a86775e5163f8f9359faf0893f3dbf3 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 14 Aug 2016 02:18:58 +0200 Subject: bugfix --- .bashrc_netwrix | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to '.bashrc_netwrix') diff --git a/.bashrc_netwrix b/.bashrc_netwrix index 6372a89..557e333 100644 --- a/.bashrc_netwrix +++ b/.bashrc_netwrix @@ -15,17 +15,24 @@ export nwx_dev3=172.28.19.61 lint_webapi() ( set -o errexit + set -o pipefail local root_dir='/cygdrive/c/Netwrix Auditor/CurrentVersion-AuditCore-Dev/AuditCore/Sources' + local -a paths + local path + cd "$root_dir/Configuration" - doslint WebAPI*.acinc WebAPI*.acconf + while IFS= read -d '' -r path; do + paths+=("$path") + done < <( find . -type f -\( -iname 'WebAPI*.acinc' -o -iname 'WebAPI*.acconf' -\) -print0 ) cd "$root_dir/Subsystems/PublicAPI" - local path - find . -type f -\( -iname '*.cpp' -o -iname '*.h' -\) | while read -r path; do - doslint "$path" - done + while IFS= read -d '' -r path; do + paths+=("$path") + done < <( find . -type f -\( -iname '*.cpp' -o -iname '*.h' -\) -print0 ) + + doslint "${paths[@]+"${paths[@]}"}" ) backup_repo_nwx() { -- cgit v1.2.3