From 491670826134208325ea897f93c545fbd5044091 Mon Sep 17 00:00:00 2001 From: eeeXun Date: Sat, 13 May 2023 23:02:29 +0800 Subject: [PATCH] docs: add `$HOME/go/bin to `$PATH` Close #19 --- README.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8e5844e..e9aa294 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ For RedHat-based Linux, you need `alsa-lib-devel`. ### Arch Linux ([AUR](https://aur.archlinux.org/packages/gtt-bin)) -``` +```sh yay -S gtt-bin ``` @@ -48,19 +48,27 @@ Binary file is available in [Release Page](https://github.com/eeeXun/gtt/release ### From source -``` +#### go install + +```sh go install github.com/eeeXun/gtt@latest ``` -or +And make sure `$HOME/go/bin` is in your `$PATH` +```sh +export PATH=$PATH:$HOME/go/bin ``` + +#### go build + +```sh git clone https://github.com/eeeXun/gtt.git && cd gtt && go build -ldflags="-s -w -X main.version=$(git describe --tags)" ``` ### Run on Docker -``` +```sh docker run -it eeexun/gtt ``` @@ -82,7 +90,7 @@ See the example in [theme.yaml](example/theme.yaml) file. This file should locat You can pass `-src` and `-dst` in argument to set source and destination language. -``` +```sh gtt -src "English" -dst "Chinese (Traditional)" ```