docs(Makefile): add rsync dry-run options

This commit is contained in:
George Rawlinson 2022-05-25 19:51:50 +00:00
parent 431ef65af5
commit 6f8f9da109
Signed by: grawlinson
GPG key ID: E0959FEA8B550539

View file

@ -15,6 +15,7 @@ REMOTE_USER=$(shell pass rsyncd/mirror-${REPO_NAME}-user)
REMOTE_HOST=$(shell pass rsyncd/mirror-${REPO_NAME}-host)
REMOTE_PATH=${REPO_NAME}
RSYNC_OPTS=-lrhvPt --delete
RSYNC_OPTS_DRY=${RSYNC_OPTS} --dry-run
RSYNC_PASSWORD=$(shell pass rsyncd/mirror-${REPO_NAME})
##@ Package
@ -39,6 +40,16 @@ push: ## Sync local repository with remote repository
@echo "$(BOLD)$(GREEN)[*] $(RST)$(BOLD)Syncing local with remote repository…$(RST)"
@RSYNC_PASSWORD=$(RSYNC_PASSWORD) rsync $(RSYNC_OPTS) $(REPO_PATH)/ rsync://$(REMOTE_USER)@$(REMOTE_HOST)/$(REMOTE_PATH)
.PHONY: dry-pull
dry-pull: ## Sync remote repository with local repository (dry run)
@echo "$(BOLD)$(GREEN)[*] $(RST)$(BOLD)Syncing remote with local repository…$(RST)"
@RSYNC_PASSWORD=$(RSYNC_PASSWORD) rsync $(RSYNC_OPTS_DRY) rsync://$(REMOTE_USER)@$(REMOTE_HOST)/$(REMOTE_PATH) $(REPO_PATH)/
.PHONY: dry-push
dry-push: ## Sync local repository with remote repository (dry run)
@echo "$(BOLD)$(GREEN)[*] $(RST)$(BOLD)Syncing local with remote repository…$(RST)"
@RSYNC_PASSWORD=$(RSYNC_PASSWORD) rsync $(RSYNC_OPTS_DRY) $(REPO_PATH)/ rsync://$(REMOTE_USER)@$(REMOTE_HOST)/$(REMOTE_PATH)
##@ Utility
.DEFAULT_GOAL = help
.PHONY: help