v/GTT
1
0
mirror of https://github.com/eeeXun/GTT.git synced 2025-05-21 10:00:59 -07:00

docs: add $HOME/go/bin to $PATH`

Close #19
This commit is contained in:
eeeXun 2023-05-13 23:02:29 +08:00
parent 4e61f852a2
commit 4916708261

View File

@ -38,7 +38,7 @@ For RedHat-based Linux, you need `alsa-lib-devel`.
### Arch Linux ([AUR](https://aur.archlinux.org/packages/gtt-bin)) ### Arch Linux ([AUR](https://aur.archlinux.org/packages/gtt-bin))
``` ```sh
yay -S gtt-bin yay -S gtt-bin
``` ```
@ -48,19 +48,27 @@ Binary file is available in [Release Page](https://github.com/eeeXun/gtt/release
### From source ### From source
``` #### go install
```sh
go install github.com/eeeXun/gtt@latest 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)" git clone https://github.com/eeeXun/gtt.git && cd gtt && go build -ldflags="-s -w -X main.version=$(git describe --tags)"
``` ```
### Run on Docker ### Run on Docker
``` ```sh
docker run -it eeexun/gtt 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. You can pass `-src` and `-dst` in argument to set source and destination language.
``` ```sh
gtt -src "English" -dst "Chinese (Traditional)" gtt -src "English" -dst "Chinese (Traditional)"
``` ```