Skip to content

Commit 7e4f49e

Browse files
Merge pull request #6 from chriscunningham-cts/missing-readme
should be working now
2 parents 8a60499 + ce5e9ba commit 7e4f49e

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

add_missing_readme.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
# adapted from https://github.com/r-lib/usethis/blob/master/inst/templates/readme-rmd-pre-commit.sh
44
# only run if no readme means nothing to check
5-
if [[ -f "README.md" ]]; then
6-
echo "$@"
7-
pwd
8-
exit 0
9-
else
10-
echo "$@"
11-
pwd
12-
echo 'lol no readme'
13-
exit 1
14-
fi
5+
6+
for i; do
7+
echo "Looking for README.md in $(dirname $i)"
8+
if [[ -f "$(dirname $i)/README.md" ]]; then
9+
echo "README.md found at $(dirname $i)/README.md"
10+
else
11+
echo "No README.md found in $(dirname $i)"
12+
exit 1
13+
fi
14+
done

0 commit comments

Comments
 (0)