diff options
-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. |