Browse Source

Add Ron's go9p and ufs as a submodule

This adds a submodule for Ron's go9p repository. It establishes the
util/third_party directory which is used as a GOPATH-style hierarchy
for things which require additional libraries.

The BUILD script builds Ron's stuff and copies the binary to util/
for convenience.

README updated.

Change-Id: I364d8d7cddfa9517b454b7d669b7c0884bbf7f03
John Floren 8 years ago
parent
commit
049de84c76
4 changed files with 12 additions and 14 deletions
  1. 3 0
      .gitmodules
  2. 2 0
      BUILD
  3. 6 14
      README
  4. 1 0
      util/third_party/src/github.com/rminnich/go9p

+ 3 - 0
.gitmodules

@@ -0,0 +1,3 @@
+[submodule "util/third_party/src/github.com/rminnich/go9p"]
+	path = util/third_party/src/github.com/rminnich/go9p
+	url = git@github.com:rminnich/go9p.git

+ 2 - 0
BUILD

@@ -56,6 +56,8 @@ build_go_utils()
 			exit 1
 		fi
 	done
+	GOPATH="$UTIL_DIR/third_party" go install github.com/rminnich/go9p
+	cp $UTIL_DIR/third_party/bin/* $UTIL_DIR/
 	cd - > /dev/null
 }
 

+ 6 - 14
README

@@ -80,20 +80,12 @@ More information on using Gerrit can be found on the gerrithub.io website.
 Getting go9p to serve your files
 ================================
 
-The currently recommended way of doing this is to run go9p/ufs as the file
-server for harvey. You can get go9p/ufs in the following way
-
-	cd util
-	mkdir go
-	cd go
-	export GOPATH=$(pwd)
-	go get github.com/rminnich/go9p
-	go get github.com/rminnich/go9p/ufs
-	go get github.com/rminnich/go9p
-	go install github.com/rminnich/go9p/ufs
-	cp bin/ufs ..
-
-After these, you have util/ufs, and you can use
+The currently recommended way of doing this is to run go9p/ufs as the
+file server for harvey. It is provided as a submodule in util/third_party
+and should be automatically compiled & copied to util/ when you run
+'BUILD utils'.
+
+Once it's built, you can run this:
 
 	(export HARVEY=$(pwd) && cd sys/src/9/k10 && sh ../../../../util/GO9PRUN)
 

+ 1 - 0
util/third_party/src/github.com/rminnich/go9p

@@ -0,0 +1 @@
+Subproject commit 2f5bafb43032e5876a205acb5eb58ed4489ffc46