#!/bin/sh set -e echo $SSH_KEY | base64 -d >> /tmp/key chmod -R 0600 /tmp/key for item in dist/*; do echo "copying $i" ITEM_NAME=$(basename $item) rsync -e "ssh -i /tmp/key -o StrictHostKeyChecking=no" -avz --delete $item $RSYNC_DESTINATION/tst/$ITEM_NAME done echo "finished copying to remote host..." cd .. rm /tmp/key