--- a/Makefile Sun Mar 13 15:51:35 2016 +0200
+++ b/Makefile Sun Mar 13 16:46:19 2016 +0200
@@ -157,12 +157,36 @@
################################################################
# Deploy targets.
-ifeq '' '$(SF_USER)'
- SF_USER := gavenkoa
-endif
+.PHONY: deploy
+deploy: deploy2defun deploy2sf
+
+
+DEFUN_USER ?= user
+DEFUN_HG_SRV ?= hg.defun.work
+DEFUN_HG_DIR ?= /srv/hg/gadict
+DEFUN_WWW_SRV ?= defun.work
+DEFUN_WWW_DIR ?= /srv/www/gadict
+
+.PHONY: deploy2defun
+deploy2defun: deploy2defun-src deploy2defun-www
-.PHONY: deploy
-deploy: deploy2sf
+.PHONY: deploy2defun-src
+deploy2defun-src:
+ hg push ssh://$(DEFUN_USER)@$(DEFUN_HG_SRV)/$(DEFUN_HG_DIR) || [ $$? = 1 ]
+
+.PHONY: deploy2defun-www
+deploy2defun-www: $(RST_HTML_FILES)
+ ( \
+echo 'cd $(DEFUN_WWW_DIR)'; \
+for f in $(RST_HTML_FILES); do \
+ echo "put $$f"; \
+ echo "chmod 644 $$f"; \
+done; \
+echo 'quit'; \
+) | sftp -b - $(DEFUN_USER)@$(DEFUN_WWW_SRV)
+
+
+SF_USER ?= gavenkoa
# First time you deploy to SourceForge (sf) you need manually login to:
# $ sftp $(SF_USER),$(pkgname)@web.sourceforge.net
@@ -170,15 +194,15 @@
# Next time any action fully automated.
.PHONY: deploy2sf
-deploy2sf: deploy2sf-src deploy2sf-doc deploy2sf-voa deploy2sf-release
+deploy2sf: deploy2sf-src deploy2sf-www deploy2sf-voa deploy2sf-release
.PHONY: deploy2sf-src
deploy2sf-src:
hg push ssh://$(SF_USER)@hg.code.sf.net/p/$(pkgname)/code || [ $$? = 1 ]
# Will be accessed via http://$(pkgname).sourceforge.net
-.PHONY: deploy2sf-doc
-deploy2sf-doc: deploy-check $(RST_HTML_FILES)
+.PHONY: deploy2sf-www
+deploy2sf-www: deploy-check $(RST_HTML_FILES)
( echo 'cd htdocs'; \
for f in $(RST_HTML_FILES); do \
echo "put $$f"; \