Skip to content

Instantly share code, notes, and snippets.

@debedb
Last active February 10, 2017 20:01
Show Gist options
  • Save debedb/cc4971e03f5321c289ad to your computer and use it in GitHub Desktop.
Save debedb/cc4971e03f5321c289ad to your computer and use it in GitHub Desktop.
#!/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