Created
March 16, 2011 18:20
-
-
Save nbrew/872995 to your computer and use it in GitHub Desktop.
Create a new directory, init a git svn repository.
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 | |
if [ $# -ne 1 ]; then | |
script=`basename $0` | |
echo "usage: ./${script} repository_name" | |
echo "Creates a new directory and initializes a new git svn repository." | |
exit 1 | |
fi | |
repo=$1 | |
dir=`basename ${repo}` | |
mkdir ${dir} && cd ${dir} && git svn init -s ${repo} && git svn fetch && if [ -e config/database.example.yml ]; then cp config/database.example.yml config/database.yml; fi && mate . && mate config/database.yml | |
echo "" | |
echo "=====================================" | |
echo "After editing your database.yml, run any required setup commands such as `bundle install`." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment