Skip to content

Instantly share code, notes, and snippets.

@andreruffert
Last active August 29, 2015 14:26
Show Gist options
  • Save andreruffert/8ac35649c2e828f14f4a to your computer and use it in GitHub Desktop.
Save andreruffert/8ac35649c2e828f14f4a to your computer and use it in GitHub Desktop.
Deploy all the stuff with scp
##
# Deploy all the stuff
##
keyfile="path/to/id_rsa"
username="user"
hostname="example.com"
remotePath="/my/remote/path"
folders="to-deploy/*"
if [ -z "$keyfile" ]
then
scp -r $folders $username@$hostname:$remotePath
else
scp -i $keyfile -r $folders $username@$hostname:$remotePath
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment