Merge branch '2342-run-command-wrapper' refs #2342
[arvados.git] / services / keep / go.sh
index fa6b5f6b4e1bde7295609b6ee77fce3abb81faba..156fe90df2a3dbc224a90c476a1b890a9d27faa5 100755 (executable)
@@ -1,11 +1,16 @@
 #! /bin/sh
 
-rootdir=$(dirname $0)
+# Wraps the 'go' executable with some environment setup.  Sets GOPATH, creates
+# 'pkg' and 'bin' directories, automatically installs dependencies, then runs
+# the underlying 'go' executable with any command line parameters provided to
+# the script.
+
+rootdir=$(readlink -f $(dirname $0))
 GOPATH=$rootdir:$rootdir/../../sdk/go:$GOPATH
 export GOPATH
 
-mkdir -p pkg
-mkdir -p bin
+mkdir -p $rootdir/pkg
+mkdir -p $rootdir/bin
 
 go get github.com/gorilla/mux