aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.bashrc
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.bashrc_distr4
-rw-r--r--.bashrc_git4
-rw-r--r--.bashrc_netwrix17
3 files changed, 17 insertions, 8 deletions
diff --git a/.bashrc_distr b/.bashrc_distr
index 8968ca5..a680b6b 100644
--- a/.bashrc_distr
+++ b/.bashrc_distr
@@ -13,9 +13,9 @@ update_checksums() {
}
update_checksums_distr() {
- local -a paths=()
+ local -a paths
local path
- while IFS= read -r -d $'\0' path; do
+ while IFS= read -d '' -r path; do
paths+=("$path")
done < <( find . -type f -\( -iname '*.exe' -o -iname '*.iso' -\) -print0 )
update_checksums "${paths[@]+"${paths[@]}"}"
diff --git a/.bashrc_git b/.bashrc_git
index 751f417..e5eaf3f 100644
--- a/.bashrc_git
+++ b/.bashrc_git
@@ -28,11 +28,12 @@ list_repo_files() (
esac
done
- eval "${cmd[@]}"
+ eval "${cmd[@]+"${cmd[@]}"}"
)
list_repo_dirs() (
set -o errexit
+ set -o pipefail
local terminator='\n'
@@ -64,6 +65,7 @@ list_repo_dirs() (
tighten_repo_security() (
set -o errexit
+ set -o pipefail
list_repo_files -z | xargs -0 chmod 0600
list_repo_dirs -z | xargs -0 chmod 0700
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() {