permission change is necessary on rsync/scp/sftp uploads to server
This commit is contained in:
parent
0a73175956
commit
1f1181a8ff
1 changed files with 13 additions and 3 deletions
16
Makefile
16
Makefile
|
@ -76,14 +76,24 @@ devserver-global:
|
|||
publish:
|
||||
"$(PELICAN)" "$(INPUTDIR)" -o "$(OUTPUTDIR)" -s "$(PUBLISHCONF)" $(PELICANOPTS)
|
||||
|
||||
ssh_upload: publish
|
||||
ssh_upload: ssh_copy fix_remote_permissions
|
||||
|
||||
ssh_copy: publish
|
||||
scp -P $(SSH_PORT) -r "$(OUTPUTDIR)"/* "$(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR)"
|
||||
|
||||
sftp_upload: publish
|
||||
sftp_upload: sftp_copy fix_remote_permissions
|
||||
|
||||
sftp_copy: publish
|
||||
printf 'put -r $(OUTPUTDIR)/*' | sftp $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR)
|
||||
|
||||
rsync_upload: publish
|
||||
rsync_upload: rsync_copy fix_remote_permissions
|
||||
|
||||
rsync_copy: publish
|
||||
rsync -e "ssh -p $(SSH_PORT)" -P -rvzc --include tags --cvs-exclude --delete "$(OUTPUTDIR)"/ "$(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR)"
|
||||
|
||||
fix_remote_permissions:
|
||||
ssh -p $(SSH_PORT) $(SSH_USER)@$(SSH_HOST) "find ${SSH_TARGET_DIR} -exec chmod gou+r {} \;"
|
||||
ssh -p $(SSH_PORT) $(SSH_USER)@$(SSH_HOST) "find ${SSH_TARGET_DIR} -type d -exec chmod gou+rx {} \;"
|
||||
|
||||
|
||||
.PHONY: html help clean regenerate serve serve-global devserver publish ssh_upload rsync_upload
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue