Last active
August 29, 2015 14:26
-
-
Save andreruffert/8ac35649c2e828f14f4a to your computer and use it in GitHub Desktop.
Deploy all the stuff with scp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# 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