fix: add build suffix (#241)

This commit is contained in:
nullishamy
2024-05-27 15:04:27 +01:00
committed by GitHub
parent 124944fc5b
commit 8b459944c4
2 changed files with 8 additions and 2 deletions

View File

@@ -55,7 +55,10 @@ class BuildContext:
tweaks: Tweaks
def output_dir(self) -> str:
return f"{self.build_root}/{self.build_id()}"
suffix = "light"
if self.flavor.dark:
suffix = "dark"
return f"{self.build_root}/{self.build_id()}-{suffix}"
def build_id(self) -> str:
return f"{self.theme_name}-{self.flavor.identifier}-{self.accent.identifier}-{self.size}+{self.tweaks.id() or 'default'}"

View File

@@ -120,8 +120,11 @@ def fetch_zip(url: str) -> Optional[zipfile.ZipFile]:
def add_libadwaita_links(ctx: InstallContext, rewrite: bool = False):
suffix = "light"
if ctx.flavor != "latte":
suffix = "dark"
dir_name = (
ctx.dest / f"catppuccin-{ctx.flavor}-{ctx.accent}-standard+default" / "gtk-4.0"
ctx.dest / f"catppuccin-{ctx.flavor}-{ctx.accent}-standard+default-{suffix}" / "gtk-4.0"
).absolute()
gtk4_dir = (Path(os.path.expanduser("~")) / ".config" / "gtk-4.0").absolute()
os.makedirs(gtk4_dir, exist_ok=True)