diff --git a/gotime/.example-autoenv.env b/gotime/.example-autoenv.env new file mode 100644 index 0000000..cf54d12 --- /dev/null +++ b/gotime/.example-autoenv.env @@ -0,0 +1,4 @@ +export PATH="$HOME/src/box-o-sand/src/gotime/.installation/go/bin:$PATH" +export GOROOT="$HOME/src/box-o-sand/src/gotime/.installation/go" +export GOPATH="$GOROOT:$HOME/src/box-o-sand/src/gotime" +source "$GOROOT/misc/bash/go" diff --git a/gotime/Makefile b/gotime/Makefile index 1517eda..fb8cdfd 100644 --- a/gotime/Makefile +++ b/gotime/Makefile @@ -1,12 +1,16 @@ -SOURCES := $(shell find src -name '*.go') -TARGETS := $(patsubst src/%.go,bin/%,$(SOURCES)) +PACKAGES := $(foreach pkg,\ + $(shell ls src/gotour.meatballhat.com),\ + $(patsubst %,gotour.meatballhat.com/%,$(pkg))\ + ) -bin/%: src/%.go - go build -x -o $@ $^ - -all: $(TARGETS) +all: + go install $(PACKAGES) clean: rm -v bin/* +env: + @echo GOPATH=$(GOPATH) + @echo PACKAGES=$(PACKAGES) + .PHONY: all clean diff --git a/gotime/src/channels.go b/gotime/src/gotour.meatballhat.com/channels/main.go similarity index 100% rename from gotime/src/channels.go rename to gotime/src/gotour.meatballhat.com/channels/main.go diff --git a/gotime/src/exercise-fibonacci-closure.go b/gotime/src/gotour.meatballhat.com/exercise-fibonacci-closure/main.go similarity index 100% rename from gotime/src/exercise-fibonacci-closure.go rename to gotime/src/gotour.meatballhat.com/exercise-fibonacci-closure/main.go diff --git a/gotime/src/exercise-http-handlers.go b/gotime/src/gotour.meatballhat.com/exercise-http-handlers/main.go similarity index 100% rename from gotime/src/exercise-http-handlers.go rename to gotime/src/gotour.meatballhat.com/exercise-http-handlers/main.go diff --git a/gotime/src/exercise-maps.go b/gotime/src/gotour.meatballhat.com/exercise-maps/main.go similarity index 100% rename from gotime/src/exercise-maps.go rename to gotime/src/gotour.meatballhat.com/exercise-maps/main.go diff --git a/gotime/src/exercise-slices.go b/gotime/src/gotour.meatballhat.com/exercise-slices/main.go similarity index 100% rename from gotime/src/exercise-slices.go rename to gotime/src/gotour.meatballhat.com/exercise-slices/main.go diff --git a/gotime/src/exercise-sqrt.go b/gotime/src/gotour.meatballhat.com/exercise-sqrt/main.go similarity index 100% rename from gotime/src/exercise-sqrt.go rename to gotime/src/gotour.meatballhat.com/exercise-sqrt/main.go diff --git a/gotime/src/goroutines.go b/gotime/src/gotour.meatballhat.com/goroutines/main.go similarity index 100% rename from gotime/src/goroutines.go rename to gotime/src/gotour.meatballhat.com/goroutines/main.go diff --git a/gotime/src/hello-web.go b/gotime/src/gotour.meatballhat.com/hello-web/main.go similarity index 100% rename from gotime/src/hello-web.go rename to gotime/src/gotour.meatballhat.com/hello-web/main.go diff --git a/gotime/src/maps.go b/gotime/src/gotour.meatballhat.com/maps/main.go similarity index 100% rename from gotime/src/maps.go rename to gotime/src/gotour.meatballhat.com/maps/main.go diff --git a/gotime/src/ranges.go b/gotime/src/gotour.meatballhat.com/ranges/main.go similarity index 100% rename from gotime/src/ranges.go rename to gotime/src/gotour.meatballhat.com/ranges/main.go