Skip to content

Commit

Permalink
chore: Installation Directory
Browse files Browse the repository at this point in the history
Using `INSTALL_DIR` to specify the installation directory, by default
`/usr/local/bin`.
  • Loading branch information
otaviof committed Feb 8, 2024
1 parent 2d00d8e commit f97906f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ E2E_DIR ?= test/e2e
E2E_TEST_GLOB ?= *.bats
E2E_TESTS = $(E2E_DIR)/$(E2E_TEST_GLOB)

INSTALL_DIR ?= /usr/local/bin

ARGS ?=

.EXPORT_ALL_VARIABLES:
Expand All @@ -32,7 +34,7 @@ run:
go run $(CMD) $(ARGS)

install: build
install -m 0755 $(BIN) $(GOPATH)/bin/
install -m 0755 $(BIN) $(INSTALL_DIR)/$(APP)

.PHONY: clean
clean:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ To install `path-helper` you can simply `go install`, as per:
go install github.com/otaviof/path-helper/cmd/path-helper@latest
```

Alternatively, you can run the following target in the project folder:
Alternatively, you can run the following target in the project folder, `sudo` might be required for completion.

```bash
make install
make install INSTALL_DIR="/usr/local/bin"
```

## Usage Examples
Expand Down

0 comments on commit f97906f

Please sign in to comment.