Created
June 21, 2017 19:52
-
-
Save leblancd/d7daa5d665da28990c974daaf8f384b4 to your computer and use it in GitHub Desktop.
Script to clone a containernetworking/plugins fork
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 | |
working_dir=$GOPATH/src/github.com/containernetworking | |
user=leblancd | |
repo=plugins | |
upstream_repo=containernetworking/plugins | |
mkdir -p $working_dir | |
cd $working_dir | |
git clone https://github.com/$user/$repo.git | |
# Add upstream repo | |
cd $working_dir/$repo | |
git remote add upstream https://github.com/$upstream_repo.git | |
# Never push to upstream master | |
git remote set-url --push upstream no_push | |
# Confirm that remote makes sense | |
git remote -v | |
cd $working_dir/$repo | |
go get ./... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment