-
-
Save lukemorton/bc1951042f5c71346269 to your computer and use it in GitHub Desktop.
This file contains 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 | |
vrake=`readlink $0` | |
expected_dir="${vrake%/*}/www/" | |
expected_dir_length=${#expected_dir} | |
dirname=${PWD##*/} | |
if [[ "${PWD:0:$expected_dir_length}" != "$expected_dir" ]]; then | |
echo "You need to be inside a directory in $expected_dir" | |
echo "You are in $PWD" | |
exit 1 | |
fi | |
vagrant ssh -c "cd /var/www/$dirname && $*" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment