]> arthur.barton.de Git - bup.git/commitdiff
Install import-rdiff-backup and import-rsnapshot correctly
authorRob Browning <rlb@defaultvalue.org>
Sat, 15 Sep 2018 17:33:10 +0000 (12:33 -0500)
committerRob Browning <rlb@defaultvalue.org>
Sat, 15 Sep 2018 17:33:10 +0000 (12:33 -0500)
Thanks to larpon for reporting the problem.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Makefile

index 6a46b8de7a2829214b016a95850e68461d07f5a5..c0c4366af748eea3f6f7e255dfff455a93d40f60 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -62,8 +62,12 @@ $(current_sampledata):
 
 define install-python-bin
   set -e; \
-  sed -e '1 s|.*|#!$(bup_python)|; 2,/^# end of bup preamble$$/d' $1 > $2; \
-  chmod 0755 $2;
+  if grep -qE '^# end of bup preamble$$' "$1"; then \
+    sed -E '1 s|.*|#!$(bup_python)|; 2,/^# end of bup preamble$$/d' $(1) > $(2); \
+  else \
+    cp $(1) $(2); \
+  fi; \
+  chmod 0755 $(2);
 endef
 
 PANDOC ?= $(shell type -p pandoc)