Skip to content

Instantly share code, notes, and snippets.

@yerstd
Last active March 16, 2019 03:12
Show Gist options
  • Save yerstd/eaef81aa4866dfdab42f9badcd695d6f to your computer and use it in GitHub Desktop.
Save yerstd/eaef81aa4866dfdab42f9badcd695d6f to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
xpath=$GOPATH/src/golang.org/x;
cd $xpath;
mkdir -p $xpath;
ls;
for name in "glog" "image" "perf" "snappy" "term" "sync" "winstrap" "cwg" "leveldb" "text" "net" "build" "protobuf" "dep" "sys" "crypto" "gddo" "tools" "scratch" "proposal" "mock" "oauth2" "freetype" "debug" "mobile" "gofrontend" "lint" "appengine" "geo" "review" "arch" "vgo" "exp" "time"
do
cd $xpath;
if [ -d "$name" ]
then
cd $name;
git pull;
else
git_url="https://github.com/golang/${name}.git";
git clone --depth 1 "$git_url";
cd $name;
fi
#go install;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment