diff options
author | Brian Picciano <bgp2396@bellsouth.net> | 2013-10-16 20:21:40 -0400 |
---|---|---|
committer | Brian Picciano <bgp2396@bellsouth.net> | 2013-10-16 20:24:03 -0400 |
commit | 98245f1639c5e4fd53b06d61889e0bac5c67382d (patch) | |
tree | ca21dadbc185904800990b2308fdfe471032e862 /res | |
parent | 5405686b0ed1a6e0a9bbf34355b7e077930f4101 (diff) | |
parent | 1517dc3d0ad0c0fbcee2c11e4477fcf92a47f0d6 (diff) |
merge in other stuff real quick
Diffstat (limited to 'res')
-rwxr-xr-x | res/go+ | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -0,0 +1,27 @@ +#!/bin/sh + +SEARCHING_FOR=GOPROJROOT +ORIG_DIR=$(pwd) + +STOPSEARCH=0 +SEARCH_DIR=$ORIG_DIR +while [ $STOPSEARCH = 0 ]; do + + RES=$( find $SEARCH_DIR -maxdepth 1 -type f -name $SEARCHING_FOR | \ + grep -P "$SEARCHING_FOR$" | \ + head -n1 ) + + if [ "$RES" = "" ]; then + if [ "$SEARCH_DIR" = "/" ]; then + STOPSEARCH=1 + fi + cd .. + SEARCH_DIR=$(pwd) + else + export GOPATH=$SEARCH_DIR:$GOPATH + STOPSEARCH=1 + fi +done + +cd "$ORIG_DIR" +exec go $@ |