]> git.sur5r.net Git - cc65/commitdiff
Avoid 'cd' in Makefile.
authorOliver Schmidt <ol.sc@web.de>
Tue, 4 Feb 2014 20:31:35 +0000 (21:31 +0100)
committerOliver Schmidt <ol.sc@web.de>
Tue, 4 Feb 2014 20:31:35 +0000 (21:31 +0100)
doc/Makefile

index 66969920dcab656c742ab84fcf442db7f8ef4550..d4860ca40f67b337b57b9ad9b149e4220e17bc92 100644 (file)
@@ -1,9 +1,10 @@
+GH_PAGES = ../../gh-pages
+
 gh-pages:
-       git clone --branch=gh-pages https://${GH_TOKEN}@github.com/oliverschmidt/cc65.git ../gh-pages
-       cd ../gh-pages
-       git config user.name "Oliver Schmidt"
-       git config user.email "ol.sc@web.de"
-       echo date > testfile.txt
-       git add -A
-       git commit -m "Updated doc from commit $(TRAVIS_COMMIT)."
-       git push
+       git clone --branch=gh-pages https://$(GH_TOKEN)@github.com/oliverschmidt/cc65.git $(GH_PAGES)
+       git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git config user.name "Oliver Schmidt"
+       git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git config user.email "ol.sc@web.de"
+       echo date > $(GH_PAGES)/testfile.txt
+       git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git add -A
+       git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git commit -m "Updated doc from commit $(TRAVIS_COMMIT)."
+       git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git push