Browse Source

Added _DIRS_UNSORTED

pull/12/head
Mykyta Solomko 5 years ago
parent
commit
8234844e3d
  1. 10
      scripts/lib/lint-common.sh

10
scripts/lib/lint-common.sh

@ -56,12 +56,14 @@ RET=0
EXTRA_ARGS=''
_SEARCH_DIRS=${_SEARCH_DIRS:-/tmp/lint-dirs.txt}
_DIRS_UNSORTED=${_DIRS_UNSORTED:-/tmp/lint-dirs-unsorted.txt}
_CHECK_FILES=${_CHECK_FILES:-/tmp/lint-files.txt}
_FILES_UNSORTED=${_FILES_UNSORTED:-/tmp/lint-files-unsorted.txt}
_BEFORE_SCRIPT=${_BEFORE_SCRIPT:-/tmp/lint-before.sh}
touch "${_SEARCH_DIRS}" \
"${_CHECK_FILES}" \
"${_DIRS_UNSORTED}" \
"${_FILES_UNSORTED}"
before_script()
@ -88,7 +90,7 @@ _dir_list()
#
for _d in ${PLUGIN_PATH[*]}; do
if [[ -d ${_d} ]]; then
readlink -f "${_d}" >> "${_SEARCH_DIRS}"
readlink -f "${_d}" >> "${_DIRS_UNSORTED}"
else
echo "Path ${_d} does not exist!" 1>&2
RET=1
@ -101,6 +103,12 @@ _dir_list()
if [[ ${RET} -ne 0 ]]; then
exit ${RET}
fi
# shellcheck disable=SC2002
cat "${_DIRS_UNSORTED}" \
| sort -n \
| uniq \
> "${_SEARCH_DIRS}"
}
_find_shell()

Loading…
Cancel
Save