summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorSam Scholten2025-10-22 15:42:13 +1000
committerSam Scholten2025-10-22 15:42:13 +1000
commit4352c0aedd3236b805977da8fc910fb8f46a9e2d (patch)
tree1fb280a77cc8a9712c551fd64c11466157e0386e /Makefile
parentbfcdc1369930fe41d3309ebfffcf5fee17a0b368 (diff)
downloaddrestic-4352c0aedd3236b805977da8fc910fb8f46a9e2d.tar.gz
drestic-4352c0aedd3236b805977da8fc910fb8f46a9e2d.zip
Add missing 'make update' target
- Add update target to Makefile for convenience - Update help text to include update command - Add update to .PHONY declaration
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 15 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 0dc88b6..636e126 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-.PHONY: all test-local format lint clean help test-remote test-remote-setup test-remote-run test-remote-verify test-remote-teardown setup-user setup-system backup-now backup-now-system check-now check-now-system status status-system snapshots snapshots-system recover uninstall-user uninstall-system update-gotify update-gotify-user update-gotify-system validate-config logs logs-system config test-update-gotify
+.PHONY: all test-local format lint clean help test-remote test-remote-setup test-remote-run test-remote-verify test-remote-teardown setup-user setup-system backup-now backup-now-system check-now check-now-system status status-system snapshots snapshots-system recover uninstall-user uninstall-system update update-gotify update-gotify-user update-gotify-system validate-config logs logs-system config test-update-gotify
# Default target
all: test-local
@@ -348,6 +348,19 @@ uninstall-user:
uninstall-system:
@./uninstall_system.sh
+update:
+ @echo "=== Update DRestic Installation ==="
+ @if [ -f ~/.config/restic/env ]; then \
+ echo "Updating user scope installation..."; \
+ ./update.sh; \
+ elif sudo [ -f /root/.restic_env ]; then \
+ echo "Updating system scope installation..."; \
+ sudo ./update.sh; \
+ else \
+ echo "Error: No DRestic installation found. Run 'make setup-user' or 'make setup-system' first."; \
+ exit 1; \
+ fi
+
update-gotify:
@echo "=== Update Gotify Configuration ==="
@if [ -f ~/.config/restic/env ]; then \
@@ -481,6 +494,7 @@ help:
@echo " uninstall-user : Uninstall user scope DRestic"
@echo " uninstall-system : Uninstall system scope DRestic"
@echo " recover : Show recovery instructions"
+ @echo " update : Update DRestic to latest version (auto-detects scope)"
@echo " update-gotify : Update Gotify notification settings (auto-detects scope)"
@echo " update-gotify-user : Update Gotify settings for user scope"
@echo " update-gotify-system : Update Gotify settings for system scope"