From fd2b4d9c79c2c4ea334719374063b9382eb10699 Mon Sep 17 00:00:00 2001 From: Miguel Mota Date: Sat, 31 Mar 2018 22:25:51 -0700 Subject: [PATCH] build Former-commit-id: 54ba9a85904c39ad7885d6cea1ae688e2263903c [formerly 54ba9a85904c39ad7885d6cea1ae688e2263903c [formerly 98e09706197dbbb1f5145e8e533c1cfa1dc5ceec [formerly c687cbc3abef76ae99b67933603e2cad5805e004]]] Former-commit-id: 1b92bdbeb8e0e875a2153b8e25fdab5535289950 Former-commit-id: 30c6f74a5e0704d6ff274a5157d58dacd419cf28 [formerly f7b540e69d18f9d7ddd60b70dbc6b417d2d0bc82] Former-commit-id: 0d7fff2c5503df20ff7cc01858fde56f43b4339d --- Makefile | 7 +++++-- README.md | 2 +- bin/{cointop.REMOVED.git-id => cointop32.REMOVED.git-id} | 0 bin/cointop64.REMOVED.git-id | 1 + install.sh | 9 ++++++++- 5 files changed, 15 insertions(+), 4 deletions(-) rename bin/{cointop.REMOVED.git-id => cointop32.REMOVED.git-id} (100%) create mode 100644 bin/cointop64.REMOVED.git-id diff --git a/Makefile b/Makefile index 84195c1..183cc62 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,10 @@ run: # http://macappstore.org/upx build: clean - go build -ldflags "-s -w" -o bin/cointop && upx bin/cointop + go build -ldflags "-s -w" -o bin/cointop32 && upx bin/cointop32 && \ + env GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -o bin/cointop64 && upx bin/cointop64 clean: - go clean && rm -f bin/cointop + go clean && \ + rm -f bin/cointop64 && \ + rm -f bin/cointop32 diff --git a/README.md b/README.md index 3705998..c766a0b 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Make sure to have [golang](https://golang.org/) installed, then do: ```bash -go install github.com/miguelmota/cointop +go get -u github.com/miguelmota/cointop ``` #### Alternatively (without go) diff --git a/bin/cointop.REMOVED.git-id b/bin/cointop32.REMOVED.git-id similarity index 100% rename from bin/cointop.REMOVED.git-id rename to bin/cointop32.REMOVED.git-id diff --git a/bin/cointop64.REMOVED.git-id b/bin/cointop64.REMOVED.git-id new file mode 100644 index 0000000..2824566 --- /dev/null +++ b/bin/cointop64.REMOVED.git-id @@ -0,0 +1 @@ +32f275e9b131848de011ae22d7c75c00aefb172f \ No newline at end of file diff --git a/install.sh b/install.sh index 6d96030..75840ab 100755 --- a/install.sh +++ b/install.sh @@ -1,7 +1,14 @@ #!/bin/bash echo "downloading..." -wget "https://github.com/miguelmota/cointop/raw/master/bin/cointop" -O cointop + +BIN="cointop32" +if [ $(uname -m) == 'x86_64' ]; then + BIN="cointop64" +fi + +wget "https://github.com/miguelmota/cointop/raw/master/bin/$BIN" -O cointop + echo "installing..." chmod +x cointop mv cointop /usr/local/bin/