1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2024-11-02 19:17:58 +01:00
tldr/scripts/lint-changed.sh

6 lines
230 B
Bash
Executable file

#!/bin/bash
MD_FILES=`git diff --cached --name-only | tr " " "\n" | egrep ^.*\.md$`
# Execute Markdown lint if any markdown files have been changed and added to git
[[ -z "$MD_FILES" ]] || GEM_PATH=.gem .gem/bin/mdl "$MD_FILES"