Use htdocs.path instead of absolute path
authorOleg Broytman <phd@phdru.name>
Fri, 28 Apr 2017 20:49:03 +0000 (23:49 +0300)
committerOleg Broytman <phd@phdru.name>
Fri, 28 Apr 2017 20:49:03 +0000 (23:49 +0300)
cookiecutter
project_template/publish-docs

index 4923b8e..ffb815e 100755 (executable)
@@ -22,6 +22,7 @@ sphinx-quickstart --project="$project_name" --author="Oleg Broytman" \
 
 git init && git add . &&
 git commit --message "Initial commit - created the project" &&
+git config htdocs.path "$HOME"/Internet/WWW/htdocs/phdru.name/Software/Python/"$project_name"/docs &&
 cp -p "$HOME"/current/projects/m_lib/update-remotes . &&
 echo /update-remotes >>.git/info/exclude &&
 exec ./mk-git-aliases
index bca4083..77c9336 100755 (executable)
@@ -1,8 +1,8 @@
 #! /bin/sh
 
-web="$HOME"/Internet/WWW/htdocs/phdru.name/Software/Python/{project}/docs
+web="`git config --get --path htdocs.path`" &&
 
 cd "`dirname \"$0\"`"/docs/_build/html &&
-rsync -ahP --del * --exclude=objects.inv "$web" &&
+rsync -ahP --del * --exclude=/objects.inv "$web" &&
 
 exec chmod -R u=rwX,go=rX "$web"