diff --git a/.github/workflows/deb-package.yml b/.github/workflows/deb-package.yml index 17d850e..5694eac 100644 --- a/.github/workflows/deb-package.yml +++ b/.github/workflows/deb-package.yml @@ -18,7 +18,7 @@ jobs: go-version: 1.19 - name: Build binaries - run: go build -v ./... && go build -v cmd/gls.go + run: go build -v ./... && go build -v cmd/gls/main.go - name: Prepare directories for .deb packaging run: | diff --git a/.gitignore b/.gitignore index 21b1672..4eab97f 100644 --- a/.gitignore +++ b/.gitignore @@ -21,7 +21,6 @@ go.work ## Custom -gls gls.out test/ *.test diff --git a/.goreleaser.yml b/.goreleaser.yml index 26c6572..5e08531 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -7,7 +7,7 @@ before: builds: - env: - CGO_ENABLED=0 - main: ./cmd/gls.go + main: ./cmd/gls/main.go binary: gls goos: - linux diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 36c0078..7bfa674 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,7 +21,7 @@ git clone git@github.com:/gls.git ```bash cd gls -go build cmd/gls.go +go build cmd/gls/main.go ``` ## Contribution Flow diff --git a/README.md b/README.md index a752ab8..4c660d3 100644 --- a/README.md +++ b/README.md @@ -22,14 +22,22 @@ It’s `ls` + `du` + `tree` with interactive TUI on your terminal! `gls` is crea ## Installation +### From Go package + +Simply run: + +```bash +go install go.sazak.io/gls/cmd/gls@latest +``` + ### From Source Code -Installing `gls` on your machine with the source code is pretty simple: just clone the repo and install `cmd/gls.go`: +Installing `gls` on your machine with the source code is pretty simple: just clone the repo and install `cmd/gls/main.go`: ```bash $ git clone https://github.com/ozansz/gls $ cd gls -$ go install ./cmd/gls.go +$ go install ./cmd/gls/main.go ``` After you run `go install` command, an executable file name `gls` is created in `$GOPATH/bin`. Now, you can simply run `gls` in terminal: @@ -51,7 +59,7 @@ You can apply the similar procedure in PowerShell shown in the [From Source Code ```powershell > git clone https://github.com/ozansz/gls > cd .\gls\ -> go install -v .\cmd\gls.go +> go install -v .\cmd\gls\main.go ``` Now, you can use `gls` in all directories. @@ -120,7 +128,7 @@ You can freely change the key bindings and shortcuts or configure the program fo After your changes, run ```bash -go build cmd/gls.go +go build cmd/gls/main.go ``` in the project directory. diff --git a/cmd/gls.go b/cmd/gls/main.go similarity index 100% rename from cmd/gls.go rename to cmd/gls/main.go diff --git a/gls b/gls new file mode 100755 index 0000000..c11ff81 Binary files /dev/null and b/gls differ