Skip to content

Commit

Permalink
🐛 don't fall apart when storage folder doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
curtisblackwell committed Nov 4, 2015
1 parent 5c78da1 commit 8647c26
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions mr_pig/scripts/deploybot/post-upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ SITE_DIR="html"
# Copy old users, _content, _storage, and assets.
rsync -avv ../$PREV_RELEASE/$SITE_DIR/_config/users $SITE_DIR/_config
rsync -avv ../$PREV_RELEASE/$SITE_DIR/_content $SITE_DIR
rsync -avv ../$PREV_RELEASE/$SITE_DIR/_storage $SITE_DIR
# Storage doesn't exist by default. Only try copying if it exists.
if [ -d "../$PREV_RELEASE/$SITE_DIR/_storage" ]; then
rsync -avv ../$PREV_RELEASE/$SITE_DIR/_storage $SITE_DIR
fi
rsync -avv ../$PREV_RELEASE/$SITE_DIR/assets $SITE_DIR


Expand All @@ -29,4 +32,6 @@ chmod -R 777 $SITE_DIR/_content
chmod -R 777 $SITE_DIR/assets
chmod -R 755 $SITE_DIR/_config/users
chmod -R 755 $SITE_DIR/_logs
chmod -R 755 $SITE_DIR/_storage
if [ -d "$SITE_DIR/_storage" ]; then
chmod -R 755 $SITE_DIR/_storage
fi

0 comments on commit 8647c26

Please sign in to comment.