fix: add build suffix (#241)
This commit is contained in:
5
build.py
5
build.py
@@ -55,7 +55,10 @@ class BuildContext:
|
|||||||
tweaks: Tweaks
|
tweaks: Tweaks
|
||||||
|
|
||||||
def output_dir(self) -> str:
|
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:
|
def build_id(self) -> str:
|
||||||
return f"{self.theme_name}-{self.flavor.identifier}-{self.accent.identifier}-{self.size}+{self.tweaks.id() or 'default'}"
|
return f"{self.theme_name}-{self.flavor.identifier}-{self.accent.identifier}-{self.size}+{self.tweaks.id() or 'default'}"
|
||||||
|
@@ -120,8 +120,11 @@ def fetch_zip(url: str) -> Optional[zipfile.ZipFile]:
|
|||||||
|
|
||||||
|
|
||||||
def add_libadwaita_links(ctx: InstallContext, rewrite: bool = False):
|
def add_libadwaita_links(ctx: InstallContext, rewrite: bool = False):
|
||||||
|
suffix = "light"
|
||||||
|
if ctx.flavor != "latte":
|
||||||
|
suffix = "dark"
|
||||||
dir_name = (
|
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()
|
).absolute()
|
||||||
gtk4_dir = (Path(os.path.expanduser("~")) / ".config" / "gtk-4.0").absolute()
|
gtk4_dir = (Path(os.path.expanduser("~")) / ".config" / "gtk-4.0").absolute()
|
||||||
os.makedirs(gtk4_dir, exist_ok=True)
|
os.makedirs(gtk4_dir, exist_ok=True)
|
||||||
|
Reference in New Issue
Block a user