docs(Makefile): add rsync dry-run options

primary
George Rawlinson 2022-05-25 19:51:50 +00:00
parent 431ef65af5
commit 6f8f9da109
Signed by: grawlinson
GPG Key ID: E0959FEA8B550539
1 changed files with 11 additions and 0 deletions

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