summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2020-06-16 15:03:31 -0400
committerBen Morrison <ben@gbmor.dev>2020-06-16 15:03:51 -0400
commitad215ba851fa0c67ff657d76b1865ab2501af715 (patch)
treeab930a63745a61261e944ca0de50737977962724
parent0c32375287202d01cc12323402a6c6f55a8104a1 (diff)
downloadclinte-ad215ba851fa0c67ff657d76b1865ab2501af715.tar.gz
install target: check for clinte.json before copying
removed upgrade target since it's now redundant
-rw-r--r--Makefile7
1 files changed, 1 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 839fe6f..7d43699 100644
--- a/Makefile
+++ b/Makefile
@@ -35,14 +35,9 @@ install:
 
 	@printf "\n%s\n" "Copying files..."
 	install -m755 target/release/clinte $(BINDIR)
-	install -m666 clinte.json $(DBDIR)
 
-	@printf "\n%s\n" "...Done!"
+	@if [ -f "$(DBDIR)/clinte.json" ]; then printf "\n%s\n" "clinte.json exists. Skipping ..."; else install -m666 clinte.json "$(DBDIR)"; fi
 
-.PHONY: upgrade
-upgrade:
-	@printf "\n%s\n" "Upgrading clinte..."
-	install -m755 target/release/clinte $(BINDIR)
 	@printf "\n%s\n" "...Done!"
 
 .PHONY: test