Browse Source

docs(Makefile): add rsync dry-run options

primary
George Rawlinson 1 month ago
parent
commit
6f8f9da109
Signed by: grawlinson
GPG Key ID: E0959FEA8B550539
  1. 11
      Makefile

11
Makefile

@ -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

Loading…
Cancel
Save