X-Git-Url: https://plomlompom.com/repos/?p=redo-blog;a=blobdiff_plain;f=README.md;h=12d7372247c8cbd88117be6399e1be9dbffb05e2;hp=49ad8b182217cb3dcf988d7218871b18144d09f8;hb=9d8c6181a6880b2c6eaa97d16e68d2fa6755cf9e;hpb=ed5ca83e98679f5f3ce50392320b427a4ac11e02 diff --git a/README.md b/README.md index 49ad8b1..12d7372 100644 --- a/README.md +++ b/README.md @@ -55,9 +55,13 @@ called `blog`: git checkout -f cd "\$GIT_WORK_TREE" redo - git add metadata/author metadata/url metadata/title metadata/*.tmpl metadata/*.automatic_metadata metadata/automatic_metadata + git add metadata/author metadata/url metadata/title metadata/*.tmpl metadata/automatic_metadata + count=\$(ls -1 metadata/*.automatic_metadata 2>/dev/null | wc -l) + if [ "\$count" != 0 ]; then + git add metadata/*.automatic_metadata + fi status=\$(git status -s) - n_updates=\$(printf "$status" | grep -vE '^\?\?' | wc -l) + n_updates=\$(printf "\$status" | grep -vE '^\?\?' | wc -l) if [ "\$n_updates" -gt 0 ]; then git commit -a -m 'Update metadata' fi @@ -103,5 +107,4 @@ break things. The article title is derived in .md files from a first line prefixed with `%`, while all other headings are treated as sub-headings. In .rst files, the title is derived from a heading that must be at the top of the document, and be of an -adornment style (such as underlining with `=`) that must be used only once in -it. +adornment style (such as underlining with `=`) used only once in it.