-
-
Save netologist/1e225b6d473ed3f9290f4b69e83788e2 to your computer and use it in GitHub Desktop.
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 | |
if [ "$1" == "" ]; then | |
echo "Usage: $0 <PROJECT_ROOT> <GITHUB_REPO>" | |
exit 1 | |
fi | |
if [ "$2" == "" ]; then | |
echo "Usage: $0 <PROJECT_ROOT> <GITHUB_REPO>" | |
exit 1 | |
fi | |
$branch=$3 | |
if [ "$branch" == "" ]; then | |
branch=master | |
fi | |
cd $1 | |
git submodule add https://github.com/${2}.git vendor/github.com/$2 | |
cd vendor/github.com/$2 | |
git checkout master | |
cd - | |
git add $2 | |
git commit -m "Added github.com/$2" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment