You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
672 B
24 lines
672 B
#!/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 --delete "${DIR}"/ "${USER}"@"${HOST}":~/"${DIR}"
|
|
|
|
echo "Deleting directory: ${DIR}..."
|
|
rm -rf ./"${DIR}"
|
|
|
|
exit 0
|