4 export GIT_WORK_TREE="$blog_dir"
8 git add metadata/author metadata/url metadata/title metadata/*.tmpl metadata/automatic_metadata captchas/linkable/*
9 count=$(ls -1 metadata/*.automatic_metadata 2>/dev/null | wc -l)
10 if [ "$count" != 0 ]; then
11 git add metadata/*.automatic_metadata
13 status=$(git status -s)
14 n_updates=$(printf "$status" | grep -vE '^\?\?' | wc -l)
15 if [ "$n_updates" -gt 0 ]; then
16 git commit -a -m 'Update metadata'