From f97906f583b46fbce700d96eda7a52a59274e311 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ot=C3=A1vio=20Fernandes?= Date: Thu, 8 Feb 2024 22:00:43 +0100 Subject: [PATCH] chore: Installation Directory Using `INSTALL_DIR` to specify the installation directory, by default `/usr/local/bin`. --- Makefile | 4 +++- README.md | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index c013c8c..b196121 100644 --- a/Makefile +++ b/Makefile @@ -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: @@ -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: diff --git a/README.md b/README.md index 32343f9..b49e686 100644 --- a/README.md +++ b/README.md @@ -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