-
-
Save ehernandez-xk/9648d253aaafad4cccbe4c78650d9754 to your computer and use it in GitHub Desktop.
Copying files to a Vagrant VM from host
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
#!/bin/sh | |
# Change these settings to match what you are wanting to do | |
FILE=/File/To/Copy | |
SERVER=localhost | |
PATH=/Where/To/Put/File | |
OPTIONS=`vagrant ssh-config | awk -v ORS=' ' '{print "-o " $1 "=" $2}'` | |
scp ${OPTIONS} $FILE vagrant@$SERVER:$PATH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment