mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Make an atomic swap of the theme directories
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
TEMPLATES_DIR="$OMARCHY_PATH/themes/templates.d"
|
||||
CURRENT_THEME_DIR="$HOME/.config/omarchy/current/theme"
|
||||
COLORS_FILE="$CURRENT_THEME_DIR/colors.toml"
|
||||
NEXT_THEME_DIR="$HOME/.config/omarchy/current/next-theme"
|
||||
COLORS_FILE="$NEXT_THEME_DIR/colors.toml"
|
||||
|
||||
# Only generate dynamic templates for themes with a colors.toml definition
|
||||
if [[ -f $COLORS_FILE ]]; then
|
||||
@@ -14,7 +14,7 @@ if [[ -f $COLORS_FILE ]]; then
|
||||
shopt -s nullglob
|
||||
for tpl in "$TEMPLATES_DIR"/*.tpl; do
|
||||
filename=$(basename "$tpl" .tpl)
|
||||
output_path="$CURRENT_THEME_DIR/$filename"
|
||||
output_path="$NEXT_THEME_DIR/$filename"
|
||||
|
||||
# Don't overwrite configs already exists in the output directory (copied from theme specific folder)
|
||||
if [[ ! -f $output_path ]]; then
|
||||
|
||||
Reference in New Issue
Block a user