From 3582fc211a8a37d161790c78de75409cc2e09837 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Thu, 4 Dec 2025 04:49:57 +0200 Subject: [PATCH] Generator Update --- generator.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/generator.php b/generator.php index 0dd24ed..470c8e4 100644 --- a/generator.php +++ b/generator.php @@ -4,18 +4,25 @@ $base = file_get_contents(__DIR__."/src/base.sh"); $dirs = [ - __DIR__.'/src/functions/*.sh' + __DIR__.'/src/functions/*.sh', + __DIR__.'/src/ui/*.sh' ]; $codes = []; foreach($dirs as $dir){ foreach(glob($dir) as $file){ - $codes[$file] = file_get_contents($file); + if(str_contains($dir, "functions")){ + $codes['functions'][$file] = file_get_contents($file); + } + if(str_contains($dir, "ui")){ + $codes['ui'][$file] = file_get_contents($file); + } } } -$code = str_replace("{{ CODES }}", implode("\n", $codes), $base); +$code = str_replace("{{ FUNCTIONS }}", implode("\n", $codes['functions']), $base); +$code = str_replace("{{ UI }}", implode("\n", $codes['ui']), $code); try { $file = __DIR__.'/init.sh';