From f7c304dae000d4b7fd98c7bdff18c51e0f1adae1 Mon Sep 17 00:00:00 2001 From: Alex Toombs Date: Sat, 12 Jul 2014 14:42:19 -0700 Subject: [PATCH] Add a script to checkout other dependencies. --- README.md | 3 ++- checkout | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100755 checkout diff --git a/README.md b/README.md index ed4322d0454..4e3239ae7f7 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,8 @@ Please put all issues regarding go IPFS _implementation_ in [this repo](https:// ``` git clone https://github.com/jbenet/go-ipfs cd go-ipfs -go install +./checkout +go install ./... ``` ## Usage diff --git a/checkout b/checkout new file mode 100755 index 00000000000..b55c19938c2 --- /dev/null +++ b/checkout @@ -0,0 +1,24 @@ +#!/bin/bash + +# We use `go get` to clone all repos. Ensure we have a GOPATH set. +if [ "$GOPATH" = "" ]; then + echo "ERROR: no GOPATH set" + exit 1 +fi + +repos=(github.com/jbenet/go-multiaddr github.com/jbenet/go-multihash + github.com/jbenet/datastore.go bazil.org/fuse code.google.com/p/gogoprotobuf/proto + github.com/gonuts/flag github.com/jbenet/commander github.com/jbenet/datastore.go/leveldb + github.com/jbenet/go-msgio) + +echo "Cloning ${#repos[@]} external repositories for go-ipfs..." + +# Download/update all repos using the `go get` tool. +for dir in ${repos[@]}; do + echo "Cloning ${dir}..." + if [ -d "$GOPATH/src/${dir}" ]; then + echo " Already exists, updating" + fi + # Hide errors/output. + go get ${dir} >/dev/null 2>&1 +done