Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion vimfiles/tools/shell/bash/update-filelist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ else
find ${FORCE_POSIX_REGEX_1} . -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} . -type f -not -path "*/\.*" |grep -v "\.\w*$" |xargs -i sh -c 'file="{}";type=$(file $file);[[ $type =~ "text" ]] && echo $file' >> "${TMP}"
fi

fi
Expand Down
3 changes: 3 additions & 0 deletions vimfiles/tools/shell/batch/update-filelist.bat
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ for /f "delims=" %%a in ('echo %cd%^|%SED_CMD% "s,\\,\\\\,g"') do (
rem process
echo ^|- generate %TMP%
dir /s /b %FILE_SUFFIXS%|%SED_CMD% "s,\(%CWD_PATTERN%\)\(.*\),.\2,gI" > "%TMP%"
dir /s /b |grep -v "\.\w*$" |%SED_CMD% "s,\(%CWD_PATTERN%\)\(.*\),.\2,gI" > "%TMP2%"
file -f "%TMP2%" |grep "ASCII.*text"|%SED_CMD% "s/;.*$//g" >> "%TMP%"
del "%TMP2%" > nul

echo ^|- apply filter
rem NOTE: dir /s /b *.cpp will list xxx.cpp~, too. So use gawk here to filter out thoes things.
Expand Down