aboutsummaryrefslogtreecommitdiffstats
path: root/install.sh
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-15 17:35:19 +0200
committerDanilo M. <danix@danix.xyz>2026-09-15 17:35:19 +0200
commit9bd8152604fcf3ece6a2ba08819e6d7c5ee7fe57 (patch)
tree5885a50c60c2368c7715311d8cf3df1a0b7d4e1e /install.sh
parenta595fc7ca575de9de87f1311f3113f6fd4c6c326 (diff)
downloadwaybar-theme-udt-9bd8152604fcf3ece6a2ba08819e6d7c5ee7fe57.tar.gz
waybar-theme-udt-9bd8152604fcf3ece6a2ba08819e6d7c5ee7fe57.zip
feat(install): skip the palette run when udt has already done it
udt's install.sh calls this script now, so that a scheme switch reaches all three generated files rather than only the stylesheet. It has run udt-palette immediately beforehand, so UDT_PALETTE_DONE=1 says so and this script does not repeat it. Run directly, with the variable unset, it still generates the palette first and works standalone. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'install.sh')
-rwxr-xr-xinstall.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/install.sh b/install.sh
index cf4965d..42bc50a 100755
--- a/install.sh
+++ b/install.sh
@@ -30,7 +30,12 @@ if [ -z "$udt" ]; then
echo " expected at $repo/../unified-desktop-theme" >&2
exit 1
fi
-"$udt/bin/udt-palette"
+
+# udt's install.sh calls this script, and it has already run udt-palette by
+# then. Running it again would be harmless but pointless, so it says so.
+if [ "${UDT_PALETTE_DONE:-}" != "1" ]; then
+ "$udt/bin/udt-palette"
+fi
install -Dm644 "$udt/templates/waybar/theme.css" "$target/styles/theme.css"
# The dot scripts are bash, not CSS, so they cannot read @define-color. Write