browser-ruler/Makefile

26 lines
628 B
Makefile
Raw Permalink Normal View History

2020-11-26 16:03:23 +00:00
# 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) 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