diff --git a/update_from_git.sh b/update_from_git.sh new file mode 100755 index 0000000000000000000000000000000000000000..0f8880bb1bd3912605fd1dd7ec137db5584ab458 --- /dev/null +++ b/update_from_git.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# Call this script with the -D or --buildDrafts to build also content marked as draft. +# And put it on a cron to synchronize periodically + +cd $(dirname "$0") + +head="$(git rev-parse HEAD)" + +git stash +git pull --rebase --recurse-submodules +git stash pop + +[[ $(git rev-parse HEAD) == $head ]] || hugo "$@"