fix: install versioned default theme state
This commit is contained in:
@@ -12,20 +12,20 @@ CONFIG_MARKER := $(CONFIG_DIR)/.tint-installed-config
|
||||
STATE_MARKER := $(CONFIG_DIR)/.tint-installed-state
|
||||
|
||||
.PHONY: install uninstall
|
||||
install:
|
||||
install: default-state.toml config.toml
|
||||
@command -v tinty >/dev/null || { echo "tinty is required" >&2; exit 1; }
|
||||
@command -v dark-notify >/dev/null || { echo "dark-notify is required" >&2; exit 1; }
|
||||
mkdir -p "$(BIN_DIR)" "$(CONFIG_DIR)" "$(HERDR_DIR)" "$(LAUNCH_AGENT_DIR)" "$(dir $(DARK_NOTIFY_LOG))"
|
||||
go build -o "$(BIN_DIR)/tint" .
|
||||
@if [ "$(CURDIR)" != "$(CONFIG_DIR)" ]; then \
|
||||
@set -e; if [ "$(CURDIR)" != "$(CONFIG_DIR)" ]; then \
|
||||
if [ -e "$(CONFIG_MARKER)" ] || [ ! -e "$(CONFIG_DIR)/config.toml" ]; then \
|
||||
cp config.toml "$(CONFIG_DIR)/config.toml"; \
|
||||
touch "$(CONFIG_MARKER)"; \
|
||||
fi; \
|
||||
if [ ! -e "$(CONFIG_DIR)/state.toml" ]; then \
|
||||
cp state.toml "$(CONFIG_DIR)/state.toml"; \
|
||||
touch "$(STATE_MARKER)"; \
|
||||
fi; \
|
||||
fi; \
|
||||
if [ ! -e "$(CONFIG_DIR)/state.toml" ]; then \
|
||||
cp default-state.toml "$(CONFIG_DIR)/state.toml"; \
|
||||
touch "$(STATE_MARKER)"; \
|
||||
fi
|
||||
@if [ ! -e "$(HERDR_CONFIG)" ]; then \
|
||||
touch "$(HERDR_CONFIG)" "$(HERDR_MARKER)"; \
|
||||
|
||||
Reference in New Issue
Block a user