Commit graph

7 commits

Author SHA1 Message Date
fox.cpp
494fd2ac72
build.sh: Remove wget dependency
It is rather silly to use curl to fetch the script itself (in tutorial)
and use wget internally.
2020-02-23 17:33:51 +03:00
fox.cpp
36578663e2
build.sh: Check GOMOD value correctly
It can be empty if modules mode is disabled.

While at it, increase the Go version to download if it is missing.
2020-02-23 04:27:03 +03:00
fox.cpp
0b7d8fc369
build.sh: Use absolute path to the Go toolchain in PATH
It was relative to the build directory which might not be the actual
current directory when calling go elsewhere.
2020-02-23 02:13:17 +03:00
fox.cpp
f097d64293
build.sh: Improve script portability
It should work fine with BusyBox basename and grep now.
2020-02-17 19:35:14 +03:00
fox.cpp
c495ade723
build.sh: Quote LDFLAGS 2020-02-17 18:47:30 +03:00
fox.cpp
a8a046617a
build.sh: Fix a few subtle errors in --version flag handling
--longoptions is replaced with -l to stay compatible with busybox
getopt.

Options switch block was checking --buildversion by accident.

.git/ check was not running popd in case of failure.
2020-02-17 17:40:50 +03:00
fox.cpp
f931cbfe45
Rewrite build scripts
New script build.sh is much more suitable for downstream packaging
(e.g. ./build.sh package) than hacked together package.sh wrapper for
get.sh while still being usable for "effort-less" installation.

Additionally, hostname setting in get.sh is flawed in many ways and is
not reimplemented in build.sh.

build.sh has proper command line options that allow to customize build
configuration and installation prefixes.
Documentation page get.sh is removed since all applicable environment
variables and flags are documented in ./build.sh --help.

build.sh can be called from the source directory to build maddy from
*this* source instead of forced 'go get' that was used in get.sh.
However, if build.sh is called not from the source directory, it clones
the repo and (optionally) uses the specified commit. This keeps build.sh
usable in curl|bash commands.

Due to the way source code is fetched, build.sh uses Git tags instead of
Go module versions as get.sh did.
2020-02-07 20:33:58 +03:00