From: dsc Date: Mon, 30 Apr 2012 17:47:04 +0000 (-0700) Subject: Improves deploy script with help, options. X-Git-Url: http://git.less.ly:3516/?a=commitdiff_plain;h=e30eaebb603cea914cb1737081a0878699fa03ac;p=limn-bak.git Improves deploy script with help, options. --- 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!"