#!/bin/sh USER=$1 # your ssh user HOST=$2 # your server host DIR=$3 # the directory where the bot files will go name it as you wish echo "Target directory: ${DIR}" sleep 1 # Copy and move the files to a directory echo "Copying files..." mkdir "${DIR}" cp config.json bot_instance.py blockbot.py run.sh log.txt requirements.txt ./"${DIR}" # Uncomment this to run tests # rsync -avz --dry-run live/ ${USER}@${HOST}:~/${DIR} # Comment this one when running tests - this will delete everything on the server that's not in the local public folder rsync -avz "${DIR}"/ "${USER}"@"${HOST}":~/"${DIR}" echo "Deleting directory: ${DIR}..." rm -rf ./"${DIR}" exit 0