Skip to content

Commit fb1cfa0

Browse files
committed
add rsync_upload target
1 parent 6b3422c commit fb1cfa0

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

Makefile

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@ SPHINXBUILD = $(PYTHON) -m sphinx
88

99
ALLSPHINXOPTS = -d build/doctrees $(SPHINXOPTS) .
1010

11+
SSH_HOST=
12+
SSH_USER=
13+
SSH_TARGET_DIR=
1114

12-
.PHONY: help clean html web pickle htmlhelp latex changes linkcheck zip
15+
.PHONY: help clean html web pickle htmlhelp latex changes linkcheck zip check-rsync-env
1316

1417
all: html-noplot
1518

@@ -114,7 +117,19 @@ install: cleandoctrees html pdf
114117
git add * && \
115118
git commit -a -m 'Make install' && \
116119
git push
117-
120+
121+
rsync_upload: check-rsync-env cleandoctrees html pdf
122+
cp ScipyLectures-simple.pdf ScipyLectures.pdf build/html/_downloads/
123+
rsync -P -auvz --delete build/html/ $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR)/
124+
125+
check-rsync-env:
126+
ifndef SSH_TARGET_DIR
127+
$(error SSH_TARGET_DIR is undefined)
128+
endif
129+
ifndef SSH_HOST
130+
$(error SSH_HOST is undefined)
131+
endif
132+
118133
epub:
119134
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) build/epub
120135
@echo

0 commit comments

Comments
 (0)