mirror of
https://github.com/laurent22/joplin.git
synced 2025-03-23 21:09:30 +02:00
14 lines
403 B
Bash
14 lines
403 B
Bash
#!/bin/sh
|
|
|
|
# In pre-commit, PWD is set to the root of the repo
|
|
# https://longair.net/blog/2011/04/09/missing-git-hooks-documentation/
|
|
ROOT_DIR="$PWD"
|
|
|
|
# If any README file has been changed, update the website
|
|
'README\|build-website'
|
|
git status -s | grep ' README\| build-website.js' > /dev/null
|
|
readmeStatus=$?
|
|
if [ $readmeStatus -eq 0 ]; then
|
|
node "$ROOT_DIR/Tools/build-website.js"
|
|
git add docs
|
|
fi |