Commits

Joseph Poirier committed 15f5c30

consolidated the source, updated for go command, readme updated

  • Participants
  • Parent commits 21a2a65

Comments (0)

Files changed (5)

Makefile

-include $(GOROOT)/src/Make.inc
-
-ifeq ($(GOOS),windows)
-EXT=.exe
-endif
-
-TARG=gich
-
-GOFILES=\
-	vars.go\
-	gich.go\
-
-CLEANFILES+=gich_test$(EXE)
-
-all:
-
-include $(GOROOT)/src/Make.cmd
-
-test:
-	$(QUOTED_GOBIN)/$(GC) -o gich_test.$O gich_test.go vars.go
-	$(QUOTED_GOBIN)/$(LD) -o gich_test$(EXE) gich_test.$O
-
 Description
 ------------
-    gich  a cross platform which tool written in Go
+    gich is a cross platform which tool written in Go
 
-    A which utility takes a list of command names and searches the path for each executable file that would be run had
+    A which utility takes a list of command names and searches 
+    the system's path for each executable file that would be run had
     these commands actually been invoked.
 
 Compiling
 ---------
-    make
+    $ hg clone bitbucket.org/jpoirier/gich
+    $ go build gich.go
+    
+    Then move the gich executable somewhere in you system path.
 
 Testing
 -------
-    make test
+
 
 Usage
 -----
 	"strings"
 )
 
+const VERSION = "1.3"
+
+var (
+	aFlag 	 bool
+	sFlag 	 bool
+	hFlag 	 bool
+	helpFlag bool
+	winFlag = false
+	eol 	= "\n"
+	sepChar = `:`
+	sepPath = `/`
+	allMsg  = "List all executable instances found rather than just the first one."
+	statMsg = "Output 'Found' if any of the executables were found and 'None' if none were found."
+	prntMsg = "Print this usage message."
+	helpMsg = "gich " + "(v" + VERSION + ")  " +
+			"a cross platform which tool written in Go\n" +
+			"Usage: gich [-l|-s|-h|-help] file ... \n" +
+			"\t-l  "   + allMsg   + " \n" +
+			"\t-s  "   + statMsg  + " \n" +
+			"\t-h  "   + prntMsg  + " \n" +
+			"\t-help " + prntMsg  + " \n"
+)
+
 func init() {
 	flag.BoolVar(&aFlag, "l", false, allMsg)
 	flag.BoolVar(&sFlag, "s", false, statMsg)
 	TestFlagS2()
 	fmt.Println("PASS")
 }
+

vars.go

-// gich  a cross platform which tool written in Go
-
-// Copyright (c) 2010 Joseph D Poirier
-// Distributable under the terms of The New BSD License
-// that can be found in the LICENSE file.
-
-package main
-
-import (
-
-)
-
-const VERSION = "1.2"
-
-var (
-	aFlag 	 bool
-	sFlag 	 bool
-	hFlag 	 bool
-	helpFlag bool
-	winFlag = false
-	eol 	= "\n"
-	sepChar = `:`
-	sepPath = `/`
-	allMsg  = "List all executable instances found rather than just the first one."
-	statMsg = "Output 'Found' if any of the executables were found and 'None' if none were found."
-	prntMsg = "Print this usage message."
-	helpMsg = "gich " + "(v" + VERSION + ")  " +
-			"a cross platform which tool written in Go\n" +
-			"Usage: gich [-l|-s|-h|-help] file ... \n" +
-			"\t-l  "   + allMsg   + " \n" +
-			"\t-s  "   + statMsg  + " \n" +
-			"\t-h  "   + prntMsg  + " \n" +
-			"\t-help " + prntMsg  + " \n"
-)