Created
July 7, 2014 14:44
-
-
Save YanhaoYang/0f517abd5e0bbc4c3238 to your computer and use it in GitHub Desktop.
A script to scp file to a Vagrant box on OS X
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
#!/usr/bin/env bash | |
if [ -n "$1" ]; | |
then | |
ssh_config=$(mktemp -t ssh_config) | |
vagrant ssh-config > "$ssh_config" | |
scp -F "$ssh_config" $@ | |
else | |
echo "Usage: vagrant-scp [options] <file name> default:[the/path]" | |
fi; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment