diff --git a/.gitignore b/.gitignore index 4df613b..e8d70f5 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ *.so *.dylib homemaker +build # Test binary, build with `go test -c` *.test diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..df27d65 --- /dev/null +++ b/Makefile @@ -0,0 +1,50 @@ +appname := homemaker +sources := $(wildcard *.go) + +build = GOOS=$(1) GOARCH=$(2) go build -o build/$(appname)$(3) +tar = cd build && tar -cvzf $(appname)_$(1)_$(2).tar.gz $(appname)$(3) && rm $(appname)$(3) +zip = cd build && zip $(appname)_$(1)_$(2).zip $(appname)$(3) && rm $(appname)$(3) + +.PHONY: all windows darwin linux clean + +all: windows darwin linux + +clean: + rm -rf build/ + +# linux builds +linux: build/$(appname)_linux_arm.tar.gz build/$(appname)_linux_arm64.tar.gz build/$(appname)_linux_386.tar.gz build/$(appname)_linux_amd64.tar.gz + +build/$(appname)_linux_386.tar.gz: $(sources) + $(call build,linux,386,) + $(call tar,linux,386) + +build/$(appname)_linux_amd64.tar.gz: $(sources) + $(call build,linux,amd64,) + $(call tar,linux,amd64) + +build/$(appname)_linux_arm.tar.gz: $(sources) + $(call build,linux,arm,) + $(call tar,linux,arm) + +build/$(appname)_linux_arm64.tar.gz: $(sources) + $(call build,linux,arm64,) + $(call tar,linux,arm64) + +# darwin builds +darwin: build/$(appname)_darwin_amd64.tar.gz + +build/$(appname)_darwin_amd64.tar.gz: $(sources) + $(call build,darwin,amd64,) + $(call tar,darwin,amd64) + +# windows builds +windows: build/$(appname)_windows_386.zip build/$(appname)_windows_amd64.zip + +build/$(appname)_windows_386.zip: $(sources) + $(call build,windows,386,.exe) + $(call zip,windows,386,.exe) + +build/$(appname)_windows_amd64.zip: $(sources) + $(call build,windows,amd64,.exe) + $(call zip,windows,amd64,.exe) diff --git a/README.md b/README.md index 07937c1..d5d94af 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,12 @@ + + # Homemaker Homemaker is a lightweight tool for straightforward and efficient management of \*nix configuration files found in the @@ -7,7 +16,7 @@ installation, has no dependencies and makes use of simple configuration file str [make](https://en.wikipedia.org/wiki/Make_%28software%29) to generate symlinks and execute system commands to aid in configuring a new system for use. -![](https://foosoft.net/projects/homemaker/img/demo.gif) +![](img/demo.gif) ## Table of Contents @@ -71,15 +80,7 @@ If you already have the Go environment and toolchain set up, you can get the lat $ go get github.com/FooSoft/homemaker ``` -Otherwise, you can use the pre-built binaries for the platforms below: - -* [homemaker\_darwin\_386.tar.gz](https://foosoft.net/projects/homemaker/dl/homemaker_darwin_386.tar.gz) -* [homemaker\_darwin\_amd64.tar.gz](https://foosoft.net/projects/homemaker/dl/homemaker_darwin_amd64.tar.gz) -* [homemaker\_linux\_386.tar.gz](https://foosoft.net/projects/homemaker/dl/homemaker_linux_386.tar.gz) -* [homemaker\_linux\_amd64.tar.gz](https://foosoft.net/projects/homemaker/dl/homemaker_linux_amd64.tar.gz) -* [homemaker\_linux\_arm.tar.gz](https://foosoft.net/projects/homemaker/dl/homemaker_linux_arm.tar.gz) -* [homemaker\_windows\_386.tar.gz](https://foosoft.net/projects/homemaker/dl/homemaker_windows_386.tar.gz) -* [homemaker\_windows\_amd64.tar.gz](https://foosoft.net/projects/homemaker/dl/homemaker_windows_amd64.tar.gz) +Otherwise, you can use the [pre-built binaries](https://github.com/FooSoft/homemaker/releases) from the project page. ## Configuration diff --git a/img/demo.gif b/img/demo.gif new file mode 100644 index 0000000..b87510d Binary files /dev/null and b/img/demo.gif differ