Created
July 13, 2012 17:21
-
-
Save BRMatt/3106102 to your computer and use it in GitHub Desktop.
A faster vagrant console
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/bash | |
# Make sure we're in the same folder as the vagrant file | |
SOURCE="${BASH_SOURCE[0]}" | |
DIR="$( dirname "$SOURCE" )" | |
while [ -h "$SOURCE" ] | |
do | |
SOURCE="$(readlink "$SOURCE")" | |
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" | |
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" | |
done | |
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" | |
cd $DIR | |
ssh vagrant@localhost -p2222 -i ~/.vagrant.d/insecure_private_key "cd /project-dir/ && ${*:1}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment