[F] Lowercase distro detection
This commit is contained in:
parent
adc947cecd
commit
485aa44f3f
2 changed files with 278 additions and 274 deletions
File diff suppressed because it is too large
Load diff
|
@ -104,7 +104,9 @@ def match_condition(match: str) -> str:
|
||||||
match = [s.strip() for s in match.split("|")]
|
match = [s.strip() for s in match.split("|")]
|
||||||
conds = []
|
conds = []
|
||||||
for m in match:
|
for m in match:
|
||||||
stripped = m.strip("*'\"")
|
stripped = m.strip("*'\"").lower()
|
||||||
|
if '*' in stripped or '"' in stripped:
|
||||||
|
print(f"TODO: Cannot properly parse: {m}")
|
||||||
|
|
||||||
# Exact matches
|
# Exact matches
|
||||||
if m.strip("*") == m:
|
if m.strip("*") == m:
|
||||||
|
@ -162,6 +164,7 @@ def export_distros():
|
||||||
from ..distro import AsciiArt
|
from ..distro import AsciiArt
|
||||||
|
|
||||||
def detect(name: str) -> AsciiArt:
|
def detect(name: str) -> AsciiArt:
|
||||||
|
name = name.lower()
|
||||||
"""
|
"""
|
||||||
py += '\n'.join(export_distro(d).strip('\n') for d in distros)
|
py += '\n'.join(export_distro(d).strip('\n') for d in distros)
|
||||||
write(Path(__file__).parent.parent / f'hyfetch/distros/distro_detector.py', py)
|
write(Path(__file__).parent.parent / f'hyfetch/distros/distro_detector.py', py)
|
||||||
|
|
Loading…
Reference in a new issue