fix: install versioned default theme state

This commit is contained in:
hl-valdemar
2026-10-23 10:23:28 +02:00
parent 92200c76ec
commit 90cf08729e
4 changed files with 207 additions and 8 deletions
+6 -6
View File
@@ -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)"; \