From 26c33c0deef133c21e29e72a9cb646bb69346aea Mon Sep 17 00:00:00 2001 From: jahway603 Date: Sun, 8 Aug 2021 00:57:39 -0400 Subject: [PATCH 1/2] created simple build script --- build.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 build.sh diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..3014201 --- /dev/null +++ b/build.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# Copyright 2021 The Hush Developers +# Released under GPLv3 + +# Check if go is installed on system and exits if it is not +if ! [ -x "$(command -v go)" ]; then + echo 'Error: go is not installed. Install go and try again.' >&2 + exit 1 +fi + +# now to compiling... +cd `pwd`/cmd/server +go build main.go +# move compiled main.go to lightwalletd +mv main `pwd`/../../lightwalletd +echo "lightwalletd is now compiled for you" From 6df1354f34456fdccf7bce8c5f32e4c9b3d50154 Mon Sep 17 00:00:00 2001 From: jahway603 Date: Sun, 8 Aug 2021 01:08:11 -0400 Subject: [PATCH 2/2] build script tweak --- build.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index 3014201..9f668ff 100755 --- a/build.sh +++ b/build.sh @@ -10,7 +10,8 @@ fi # now to compiling... cd `pwd`/cmd/server -go build main.go +go build -o lightwalletd main.go # move compiled main.go to lightwalletd -mv main `pwd`/../../lightwalletd -echo "lightwalletd is now compiled for you" +mv lightwalletd `pwd`/../../lightwalletd +echo "lightwalletd is now compiled for you." +echo "for options, run ./lightwalletd --help"