2019-12-15 06:37:19 +00:00
|
|
|
SRC_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
2019-04-27 22:21:33 +00:00
|
|
|
|
|
|
|
include ../lib/shared.mk
|
2019-12-15 06:37:19 +00:00
|
|
|
RC_TARGET := $(XDG_DIR)/tridactyl
|
2019-09-21 19:04:38 +00:00
|
|
|
SCRIPTS_TARGET := ~/.local/share/tridactyl/scripts
|
2019-04-27 22:21:33 +00:00
|
|
|
|
|
|
|
install: | init update
|
|
|
|
|
|
|
|
init:
|
2020-03-09 17:30:45 +00:00
|
|
|
if [[ $OSTYPE = darwin* ]] ; then
|
|
|
|
$(MAKE) -C $(SRC_DIR) setup
|
|
|
|
elif (( $$+commands[firefox] )) ; then
|
|
|
|
$(MAKE) -C $(SRC_DIR) setup
|
|
|
|
else
|
|
|
|
$(report) debug "This doesn't seem to be an env for Tridactyl. Skipping."
|
|
|
|
fi
|
2019-04-27 22:21:33 +00:00
|
|
|
|
2019-12-15 06:37:19 +00:00
|
|
|
setup:
|
2020-03-09 17:30:45 +00:00
|
|
|
$(report) header "Setting up Tridaycl"
|
2019-12-15 06:37:19 +00:00
|
|
|
$(mk_link) $(SRC_DIR) $(RC_TARGET)
|
|
|
|
$(mk_link) $(SRC_DIR)/scripts $(SCRIPTS_TARGET)
|
|
|
|
|
2019-04-27 22:21:33 +00:00
|
|
|
update:
|
|
|
|
|
|
|
|
remove:
|
2020-03-09 17:30:45 +00:00
|
|
|
$(report) header "Removing Tridaycl"
|
2019-12-15 06:37:19 +00:00
|
|
|
$(rm_link) $(RC_TARGET)
|
2019-09-21 19:04:38 +00:00
|
|
|
$(rm_link) $(SCRIPTS_TARGET)
|