Skip to content

Commit

Permalink
fd test
Browse files Browse the repository at this point in the history
  • Loading branch information
gaurav-nelson committed Aug 19, 2020
1 parent 7ababe1 commit 3d3bc9c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM node:alpine
RUN apk add --no-cache bash>5.0.16-r0 git>2.26.0-r0
RUN apk add --no-cache bash>5.0.16-r0 git>2.26.0-r0 fd>8.1.1-r0
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
12 changes: 6 additions & 6 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ handle_files () {
exit 2
fi
if [ $index == 0 ]; then
COMMAND_FILES+=("-wholename ${FILELIST[index]}")
COMMAND_FILES+=("${FILELIST[index]}")
else
COMMAND_FILES+=("-o -wholename ${FILELIST[index]}")
COMMAND_FILES+=("|${FILELIST[index]}")
fi
done
FILES="${COMMAND_FILES[*]}"
Expand Down Expand Up @@ -125,9 +125,9 @@ check_additional_files () {

if [ -n "$FILES" ]; then
if [ "$MAX_DEPTH" -ne -1 ]; then
FIND_CALL=('find' '.' '-type' 'f' '(' ${FILES} ')' '-not' '-path' './node_modules/*' '-maxdepth' "${MAX_DEPTH}" '-exec' 'markdown-link-check' '{}')
FIND_CALL=('fd' '--type' 'f' '('"${FILES// /}"')' '--max-depth' "${MAX_DEPTH}" '.' '--exec' 'markdown-link-check')
else
FIND_CALL=('find' '.' '-type' 'f' '(' ${FILES} ')' '-not' '-path' './node_modules/*' '-exec' 'markdown-link-check' '{}')
FIND_CALL=('fd' '--type' 'f' '('"${FILES// /}"')' '.' '--exec' 'markdown-link-check')
fi

add_options
Expand Down Expand Up @@ -182,9 +182,9 @@ if [ "$CHECK_MODIFIED_FILES" = "yes" ]; then
else

if [ "$5" -ne -1 ]; then
FIND_CALL=('find' ${FOLDERS} '-name' '*'"${FILE_EXTENSION}" '-not' '-path' './node_modules/*' '-maxdepth' "${MAX_DEPTH}" '-exec' 'markdown-link-check' '{}')
FIND_CALL=('fd' '.' ${FOLDERS} '-e' "${FILE_EXTENSION}" '--max-depth' "${MAX_DEPTH}" '--exec' 'markdown-link-check')
else
FIND_CALL=('find' ${FOLDERS} '-name' '*'"${FILE_EXTENSION}" '-not' '-path' './node_modules/*' '-exec' 'markdown-link-check' '{}')
FIND_CALL=('fd' '.' ${FOLDERS} '-e' "${FILE_EXTENSION}" '--exec' 'markdown-link-check')
fi

add_options
Expand Down

0 comments on commit 3d3bc9c

Please sign in to comment.