deploy.sh (481B)
1 #!/bin/bash 2 3 SERVER_USER="root" 4 SERVER_HOST="kh1b.org" 5 BASE_REMOTE_PATH="/var/www" 6 7 DIRECTORIES=( 8 "pub.kh1b.org" 9 "git.kh1b.org" 10 "kh1b.org" 11 ) 12 13 14 for dir in "${DIRECTORIES[@]}"; do 15 if [ -d "$dir/.webroot" ]; then 16 echo "Deploying $dir to $SERVER_USER@$SERVER_HOST:$BASE_REMOTE_PATH/$dir/ ..." 17 rsync -avz "$dir/.webroot/" "$SERVER_USER@$SERVER_HOST:$BASE_REMOTE_PATH/$dir/" 18 else 19 echo "skipping $dir" 20 fi 21 done 22 23 echo "deployment completed."