browser-ruler/Makefile
2022-01-27 22:07:41 -08:00

26 lines
656 B
Makefile

# BIN = browser_ruler.py
BIN = browser-ruler
SCRIPT_INSTALL_PATH ?= $(HOME)/.local/bin
DESKTOP_INSTALL_PATH ?= $(HOME)/.local/share/applications
.PHONY: default all clean
default: test
.PHONY: test
test: $(BIN)
./$(BIN) -config ./sample-config.hcl https://duck.com/
$(BIN): *.go
go build .
.PHONY: install
install: $(BIN)
mkdir -p "$(SCRIPT_INSTALL_PATH)"
mkdir -p "$(DESKTOP_INSTALL_PATH)"
cp $(BIN) "$(SCRIPT_INSTALL_PATH)/$(BIN)"
sed "s|{SCRIPT}|$(SCRIPT_INSTALL_PATH)/$(BIN)|" ./browserRuler.desktop > "$(DESKTOP_INSTALL_PATH)/browserRuler.desktop"
.PHONY: set-default
set-default:
xdg-settings set default-web-browser browserRuler.desktop