home
·
contact
·
privacy
projects
/
redo-blog
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
ed5ca83
)
Handle empty blog case in README recipe.
author
Christian Heller
<c.heller@plomlompom.de>
Mon, 2 Jan 2017 22:36:37 +0000
(23:36 +0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Mon, 2 Jan 2017 22:36:37 +0000
(23:36 +0100)
README.md
patch
|
blob
|
history
diff --git
a/README.md
b/README.md
index 49ad8b182217cb3dcf988d7218871b18144d09f8..d9e0f2c0e73618aa0c4cb783eb6f8278f9a82121 100644
(file)
--- a/
README.md
+++ b/
README.md
@@
-55,7
+55,11
@@
called `blog`:
git checkout -f
cd "\$GIT_WORK_TREE"
redo
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)
if [ "\$n_updates" -gt 0 ]; then
status=\$(git status -s)
n_updates=\$(printf "$status" | grep -vE '^\?\?' | wc -l)
if [ "\$n_updates" -gt 0 ]; then