diff options
author | emkael <emkael@tlen.pl> | 2017-09-08 13:05:08 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2017-09-08 13:05:08 +0200 |
commit | 200890d01feb2fa26159cf18237f9a4f23286a59 (patch) | |
tree | 31122b62d63051726d932af30ac97b1fa084b84f | |
parent | 2cddc37cf15be7290140f748914312c94a6a3266 (diff) |
Deploy script source directory defined as parameter
-rw-r--r-- | Makefile | 2 | ||||
-rwxr-xr-x | bin/deploy.sh | 5 | ||||
-rw-r--r-- | docs/scripts.md | 2 |
3 files changed, 5 insertions, 4 deletions
@@ -45,7 +45,7 @@ $(tmpfiles): deploy: find http -type f -name .menu.html -delete - bin/deploy.sh + bin/deploy.sh http clean: find http -type f -name \*.html -delete diff --git a/bin/deploy.sh b/bin/deploy.sh index ec0d4ec..4a5d451 100755 --- a/bin/deploy.sh +++ b/bin/deploy.sh @@ -1,8 +1,9 @@ #!/bin/bash +LOCALPATH=$1 DEPLOYPATH=`cat config/deploy-path` if [ -s config/deploy-pass ] then - sshpass -f config/deploy-pass rsync -urpP --delete http/ $DEPLOYPATH + sshpass -f config/deploy-pass rsync -urpP --delete $LOCALPATH/ $DEPLOYPATH else - rsync -urpP --delete http/ $DEPLOYPATH + rsync -urpP --delete $LOCALPATH/ $DEPLOYPATH fi diff --git a/docs/scripts.md b/docs/scripts.md index 8c5ad05..d715671 100644 --- a/docs/scripts.md +++ b/docs/scripts.md @@ -100,4 +100,4 @@ Deployment scripts `deploy.sh` -Just run it to sync pages output directory with a remote location, via `rsync`. If `config/deploy-pass` is present, it's provided to rsync via `sshpass`. `config/deploy-path` defines remote path for sync. +Just run it to sync pages output directory (script's parameter) with a remote location, via `rsync`. If `config/deploy-pass` is present, it's provided to rsync via `sshpass`. `config/deploy-path` defines remote path for sync. |