SELF=ryf.git
REPO_DIR=$HOME/repositories
CHECKOUT_DIR=$HOME/local/checkouts/$SELF
-TARGET_DIR=/var/www/ryf.fsf.org
+TARGET_DIR=/var/www
TARGET_HOST=ryf.fsf.org
case $1 in
refs/heads/live)
branch=live
+ TARGET_DIR=$TARGET_DIR/ryf.fsf.org
;;
refs/heads/dev)
branch=dev
+ TARGET_DIR=$TARGET_DIR/ryf-dev.fsf.org
;;
*)
echo "No action for this branch!"
fi
if [ -n $TARGET_HOST ]; then
- echo Deploying to: $branch
+ echo Deploying to: $TARGET_DIR
rsync -avrSPX --delete-after $CHECKOUT_DIR/* root@$TARGET_HOST:$TARGET_DIR/
fi