]> arthur.barton.de Git - bup.git/commitdiff
Makefile: check for bup version failures
authorRob Browning <rlb@defaultvalue.org>
Sat, 13 Feb 2021 20:48:37 +0000 (14:48 -0600)
committerRob Browning <rlb@defaultvalue.org>
Sat, 6 Mar 2021 18:29:38 +0000 (12:29 -0600)
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Makefile

index e45719d6118027d5d841c31370920dfdd07ea710..29383a55fda62f5deab8e1daeec52bd898c79823 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -203,8 +203,11 @@ cmd/bup-%: cmd/%-cmd.sh
 Documentation/all: $(man_roff) $(man_html)
 
 Documentation/substvars: $(bup_deps)
-       echo "s,%BUP_VERSION%,$$(./bup version),g" > $@
-       echo "s,%BUP_DATE%,$$(./bup version --date),g" >> $@
+        # FIXME: real temp file
+       set -e; bup_ver=$$(./bup version); \
+       echo "s,%BUP_VERSION%,$$bup_ver,g" > $@.tmp; \
+       echo "s,%BUP_DATE%,$$bup_ver,g" >> $@.tmp
+       mv $@.tmp $@
 
 Documentation/%.1: Documentation/%.md Documentation/substvars
        $(pf); sed -f Documentation/substvars $< \