track HTML changes in git
authorRalf Jung <post@ralfj.de>
Wed, 21 Nov 2018 08:24:02 +0000 (09:24 +0100)
committerRalf Jung <post@ralfj.de>
Wed, 21 Nov 2018 08:24:02 +0000 (09:24 +0100)
personal/upload.sh
research/upload.sh

index 6733051ce12ba7dc3b8620c1616fbadd6057152c..2d9205e38214e03dec7fcaba986554b108380249 100755 (executable)
@@ -3,4 +3,11 @@ cd "$(dirname "$0")"
 
 jekyll build
 cd _site
 
 jekyll build
 cd _site
-rsync ./ www.ralfj.de:/srv/www.ralfj.de/docroot/ -aP
+
+git add .
+if ! git diff --cached; then
+    # There are changes
+    git commit -m "site upload"
+fi
+
+rsync ./ www.ralfj.de:/srv/www.ralfj.de/docroot/ -aP --exclude .git
index 3a528b5145d7db7928cc9d730d8afe3e0587cd4d..6832be43c8699654210aaa60026e2da4cac1a5dd 100755 (executable)
@@ -3,4 +3,11 @@ cd "$(dirname "$0")"
 
 jekyll build
 cd _site
 
 jekyll build
 cd _site
-rsync ./ mpi-contact:public_html/ -aP
+
+git add .
+if ! git diff --cached; then
+    # There are changes
+    git commit -m "site upload"
+fi
+
+rsync ./ mpi-contact:public_html/ -aP --exclude .git