Set of rules to decide which browser to use to launch a url
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

28 lines
705 B

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
.PHONY: install-hooks
install-hooks:
pre-commit install --install-hooks