From e30eaebb603cea914cb1737081a0878699fa03ac Mon Sep 17 00:00:00 2001 From: dsc Date: Mon, 30 Apr 2012 10:47:04 -0700 Subject: [PATCH] Improves deploy script with help, options. --- deploy.sh | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/deploy.sh b/deploy.sh index 93e0889..7bc55f2 100755 --- a/deploy.sh +++ b/deploy.sh @@ -81,10 +81,10 @@ fi # makes sure everything is owned by www-data fix_permissions () { - [ -n "$FIX_PERMISSIONS" ] && return 0 + [ -z "$FIX_PERMISSIONS" ] && return 0 log "Fixing permissions on $DEPLOY_HOST:$DEPLOY_PATH ..." log "ssh -t $DEPLOY_HOST '/usr/bin/sudo /bin/chmod --changes -R g+w $DEPLOY_PATH && /usr/bin/sudo /bin/chown --changes -R $DEPLOY_USER:$DEPLOY_GROUP $DEPLOY_PATH'" - [ -n "$DRY_RUN" ] && ssh -t $DEPLOY_HOST "/usr/bin/sudo /bin/chmod --changes -R g+w $DEPLOY_PATH && /usr/bin/sudo /bin/chown --changes -R $DEPLOY_USER:$DEPLOY_GROUP $DEPLOY_PATH" + [ -z "$DRY_RUN" ] && ssh -t $DEPLOY_HOST "/usr/bin/sudo /bin/chmod --changes -R g+w $DEPLOY_PATH && /usr/bin/sudo /bin/chown --changes -R $DEPLOY_USER:$DEPLOY_GROUP $DEPLOY_PATH" } # Ensure gitrev is up to date @@ -138,8 +138,8 @@ log "ok!" log "Deploying files..." # fix ownership and permissions before and after rsync. fix_permissions -log "rsync -Caz $VERBOSE $DRY_RUN --progress tmp/dist $DEPLOY_HOST:$DEPLOY_PATH" -rsync -Crz $VERBOSE $DRY_RUN --progress tmp/dist $DEPLOY_HOST:$DEPLOY_PATH +log "rsync -Caz $VERBOSE $DRY_RUN tmp/dist $DEPLOY_HOST:$DEPLOY_PATH" +rsync -Crz $VERBOSE $DRY_RUN tmp/dist $DEPLOY_HOST:$DEPLOY_PATH fix_permissions log "ok!" -- 1.7.0.4