diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -62,13 +62,21 @@ gotop should build with most versions of Go. If you have a version other than 1 git clone https://github.com/xxxserxxx/gotop.git cd gotop sed -i '/^go/d' go.mod # Do this if you have go != 1.14 -go build -o gotop ./cmd/gotop +VERS="$(git tag -l --sort=-v:refname | sed 's/v\([^-].*\)/\1/g' | head -1 | tr -d '-' ).$(git describe --long --tags | sed 's/\([^-].*\)-\([0-9]*\)-\(g.*\)/r\2.\3/g' | tr -d '-')" +DAT=$(date +%Y%m%dT%H%M%S) +go build -o gotop \ + -ldflags "-X main.Version=v${VERS} -X main.BuildDate=${DAT}" \ + ./cmd/gotop ``` Move `gotop` to somewhere in your `$PATH`. If Go is not installed or is the wrong version, and you don't have root access or don't want to upgrade Go, a script is provided to download Go and the gotop sources, compile gotop, and then clean up. See `scripts/install_without_root.sh`. +#### go generate + +Apple SMC tags are embedded in a text file that is compiled into the executable; the same happens with the language translations. When the file `devices/data/sm.tsv` or any translations in `translations/dicts/` change, `go generate` should be re-run. + ## Usage Run with `-h` to get an extensive list of command line arguments. Many of these can be configured by creating a configuration file; see the next section for more information. Key bindings can be viewed while gotop is running by pressing the `?` key, or they can be printed out by using the `--list keys` command. @@ -110,6 +118,7 @@ For more information on other topics, see: - [goreleaser/nfpm](https://github.com/goreleaser/nfpm) - [distatus/battery](https://github.com/distatus/battery) - [VictoriaMetrics/metrics](https://github.com/VictoriaMetrics/metrics) Check this out! The API is clean, elegant, introduces many fewer indirect dependencies than the Prometheus client, and adds 50% less size to binaries. +- [lingo-toml](https://github.com/jdkeke142/lingo-toml) provides the translation support library. ## History |