mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-04-27 14:57:40 +00:00
fix arg processing in bin/publish.sh
This commit is contained in:
parent
b365a1dae9
commit
9d3f886ce0
1 changed files with 2 additions and 4 deletions
|
|
@ -12,10 +12,9 @@ PUBLISH_HOST="samhuri.net"
|
||||||
PUBLISH_DIR="samhuri.net/public"
|
PUBLISH_DIR="samhuri.net/public"
|
||||||
ECHO=0
|
ECHO=0
|
||||||
RSYNC_OPTS=""
|
RSYNC_OPTS=""
|
||||||
RSYNC_DELETE=0
|
|
||||||
|
|
||||||
BREAK_WHILE=0
|
BREAK_WHILE=0
|
||||||
while [[ $# > 1 ]]; do
|
while [[ $# > 0 ]]; do
|
||||||
ARG="$1"
|
ARG="$1"
|
||||||
case "$ARG" in
|
case "$ARG" in
|
||||||
|
|
||||||
|
|
@ -31,7 +30,6 @@ while [[ $# > 1 ]]; do
|
||||||
;;
|
;;
|
||||||
|
|
||||||
-d|--delete)
|
-d|--delete)
|
||||||
RSYNC_DELETE=1
|
|
||||||
RSYNC_OPTS="$RSYNC_OPTS --delete"
|
RSYNC_OPTS="$RSYNC_OPTS --delete"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
|
@ -48,7 +46,7 @@ while [[ $# > 1 ]]; do
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ $# -eq 0 ]]; then
|
if [[ $# -eq 0 ]]; then
|
||||||
CMD=rsync -aKv $RSYNC_OPTS www/ "$PUBLISH_HOST":"$PUBLISH_DIR"
|
CMD="rsync -aKv $RSYNC_OPTS www/ $PUBLISH_HOST:$PUBLISH_DIR"
|
||||||
else
|
else
|
||||||
CMD="rsync -aKv $RSYNC_OPTS $@ $PUBLISH_HOST:$PUBLISH_DIR"
|
CMD="rsync -aKv $RSYNC_OPTS $@ $PUBLISH_HOST:$PUBLISH_DIR"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue