summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2017-06-15 23:46:57 +0200
committeremkael <emkael@tlen.pl>2017-06-15 23:46:57 +0200
commitf082f7c25fba7d7064a2bbda0dd9cc1d0babfb35 (patch)
tree3788772fe294ef50d5a41a9c7b1f0c0ea4f95c63
parent1bd357ec8967e5b6c04e737dc6639162477064f1 (diff)
`deploy` target in separate executable, more flexible
Fixes #3
-rw-r--r--Makefile2
-rwxr-xr-xbin/deploy.sh8
2 files changed, 9 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index d86fb89..8283fa9 100644
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,7 @@ all: rankings players
minimize: $(tmpfiles)
deploy:
- sshpass -p `cat config/deploy-pass` rsync -urpP http/ `cat config/deploy-path`
+ bin/deploy.sh
rankings: tables editions
diff --git a/bin/deploy.sh b/bin/deploy.sh
new file mode 100755
index 0000000..39812e4
--- /dev/null
+++ b/bin/deploy.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+DEPLOYPATH=`cat config/deploy-path`
+if [ -s config/deploy-pass ]
+then
+ sshpass -p `cat config/deploy-pass` rsync -urpP http/ $DEPLOYPATH
+else
+ rsync -urpP http/ $DEPLOYPATH
+fi