diff --git a/vimfiles/tools/shell/bash/update-filelist.sh b/vimfiles/tools/shell/bash/update-filelist.sh index 9d974336..9e18d11a 100644 --- a/vimfiles/tools/shell/bash/update-filelist.sh +++ b/vimfiles/tools/shell/bash/update-filelist.sh @@ -17,23 +17,23 @@ fi echo " |- generate ${TMP}" if test "${FOLDERS}" != ""; then - find ${FORCE_POSIX_REGEX_1} . -type f -not -path "*/\.*" ${FORCE_POSIX_REGEX_2} ${IS_EXCLUDE} -regex ".*/("${FOLDERS}")/.*" ${FORCE_POSIX_REGEX_2} -regex ".*\.("${FILE_SUFFIXS}")$" > "${TMP}" + find ${FORCE_POSIX_REGEX_1} $PWD -type f -not -path "*/\.*" ${FORCE_POSIX_REGEX_2} ${IS_EXCLUDE} -regex ".*/("${FOLDERS}")/.*" ${FORCE_POSIX_REGEX_2} -regex ".*\.("${FILE_SUFFIXS}")$" > "${TMP}" if [[ "${FILE_SUFFIXS}" =~ __EMPTY__ ]]; then - find ${FORCE_POSIX_REGEX_1} . -type f -not -path "*/\.*" ${FORCE_POSIX_REGEX_2} ${IS_EXCLUDE} -regex ".*/("${FOLDERS}")/.*" ${FORCE_POSIX_REGEX_2} |grep -v "\.\w*$" |xargs -i sh -c 'file="{}";type=$(file $file);[[ $type =~ "text" ]] && echo $file' >> "${TMP}" + find ${FORCE_POSIX_REGEX_1} $PWD -type f -not -path "*/\.*" ${FORCE_POSIX_REGEX_2} ${IS_EXCLUDE} -regex ".*/("${FOLDERS}")/.*" ${FORCE_POSIX_REGEX_2} |grep -v "\.\w*$" |xargs -i sh -c 'file="{}";type=$(file $file);[[ $type =~ "text" ]] && echo $file' >> "${TMP}" fi else - find ${FORCE_POSIX_REGEX_1} . -type f -not -path "*/\.*" ${FORCE_POSIX_REGEX_2} -regex ".*\.("${FILE_SUFFIXS}")$" > "${TMP}" + find ${FORCE_POSIX_REGEX_1} $PWD -type f -not -path "*/\.*" ${FORCE_POSIX_REGEX_2} -regex ".*\.("${FILE_SUFFIXS}")$" > "${TMP}" if [[ "${FILE_SUFFIXS}" =~ __EMPTY__ ]]; then - find ${FORCE_POSIX_REGEX_1} . -type f -not -path "*/\.*" ${FORCE_POSIX_REGEX_2} -regex ".*\.("${FILE_SUFFIXS}")$" |grep -v "\.\w*$" |xargs -i sh -c 'file="{}";type=$(file $file);[[ $type =~ "text" ]] && echo $file' >> "${TMP}" + find ${FORCE_POSIX_REGEX_1} $PWD -type f -not -path "*/\.*" ${FORCE_POSIX_REGEX_2} -regex ".*\.("${FILE_SUFFIXS}")$" |grep -v "\.\w*$" |xargs -i sh -c 'file="{}";type=$(file $file);[[ $type =~ "text" ]] && echo $file' >> "${TMP}" fi fi # DISABLE -# # find . -type f -not -path "*/\.*" > "${TMP}" +# # find $PWD -type f -not -path "*/\.*" > "${TMP}" # if [ -f "${TMP}" ]; then # echo " |- filter by gawk ${TMP}" # gawk -v file_filter=${FILE_FILTER_PATTERN} -v folder_filter=${FOLDER_FILTER_PATTERN} -f "${TOOLS}/gawk/file-filter-${GAWK_SUFFIX}.awk" "${TMP}">"${TMP2}"