This repository was archived by the owner on Nov 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +1
-17
lines changed Expand file tree Collapse file tree 1 file changed +1
-17
lines changed Original file line number Diff line number Diff line change @@ -18,11 +18,6 @@ grep -P 'lint.sh' scripts/lint.sh &>/dev/null || (
1818 exit 255
1919)
2020
21- # Trim leading/trailing whitespace from a single line.
22- trim_ws () {
23- sed -e ' s/^[[:space:]]*//' -e ' s/[[:space:]]*$//'
24- }
25-
2621# Read excluded directories into arrays
2722DEFAULT_FILES=()
2823UPSTREAM_FILES=()
@@ -48,15 +43,6 @@ function read_dirs {
4843 local -a upstream_find_args=()
4944 local -a upstream_exclude_args=()
5045 for line in " ${upstream_folders[@]} " ; do
51- # Normalize and skip invalid entries to avoid matching the entire repo:
52- # - strip CR (handles CRLF files)
53- # - trim leading/trailing whitespace
54- # - skip blank lines and comment lines
55- line=${line% $' \r ' }
56- line=$( printf ' %s' " $line " | trim_ws)
57- [[ -z " $line " ]] && continue
58- [[ " ${line: 0: 1} " == " #" ]] && continue
59-
6046 if [[ " $line " == ! * ]]; then
6147 # Excluding files with !
6248 upstream_exclude_args+=(! -path " ./${line: 1} " )
@@ -65,9 +51,7 @@ function read_dirs {
6551 fi
6652 done
6753 # Remove the last '-o' from the arrays
68- if (( ${# upstream_find_args[@]} > 0 )) ; then
69- unset ' upstream_find_args[${#upstream_find_args[@]}-1]'
70- fi
54+ unset ' upstream_find_args[${#upstream_find_args[@]}-1]'
7155
7256 # Find upstream files
7357 mapfile -t UPSTREAM_FILES < <(
You can’t perform that action at this time.
0 commit comments