Improves deploy script with help, options.
authordsc <dsc@less.ly>
Mon, 30 Apr 2012 17:47:04 +0000 (10:47 -0700)
committerdsc <dsc@less.ly>
Mon, 30 Apr 2012 17:47:04 +0000 (10:47 -0700)
deploy.sh

index 93e0889..7bc55f2 100755 (executable)
--- 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!"