mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-03-25 09:05:47 +00:00
make publish script work on Ubuntu
This commit is contained in:
parent
4318c0b903
commit
be7cbb4264
1 changed files with 5 additions and 4 deletions
|
|
@ -40,14 +40,15 @@ while [[ $# > 0 ]]; do
|
|||
[[ $BREAK_WHILE -eq 1 ]] && break
|
||||
done
|
||||
|
||||
declare -a CMD
|
||||
if [[ $# -eq 0 ]]; then
|
||||
CMD="rsync -aKv $RSYNC_OPTS www/ $PUBLISH_HOST:$PUBLISH_DIR"
|
||||
CMD=(rsync -aKv -e "ssh -4" $RSYNC_OPTS www/ $PUBLISH_HOST:$PUBLISH_DIR)
|
||||
else
|
||||
CMD="rsync -aKv $RSYNC_OPTS $@ $PUBLISH_HOST:$PUBLISH_DIR"
|
||||
CMD=(rsync -aKv -e "ssh -4" $RSYNC_OPTS $@ $PUBLISH_HOST:$PUBLISH_DIR)
|
||||
fi
|
||||
|
||||
if [[ $ECHO -eq 1 ]]; then
|
||||
echo "$CMD"
|
||||
echo "${CMD[@]}"
|
||||
fi
|
||||
|
||||
$CMD
|
||||
"${CMD[@]}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue