1
Fork 0
mirror of https://github.com/RGBCube/ThemeNix synced 2025-07-27 08:27:45 +00:00

scripts: fix generate-themes.nu logging

This commit is contained in:
RGBCube 2025-05-24 22:24:08 +03:00
parent c188d0d729
commit ef2c6ce044
Signed by: RGBCube
SSH key fingerprint: SHA256:CzqbPcfwt+GxFYNnFVCqoN5Itn4YFrshg1TrnACpA5M

View file

@ -24,7 +24,7 @@ def theme-to-nix [
} }
def generate-valid-themes [] { def generate-valid-themes [] {
echo "generating themes.nix..." print "generating themes.nix..."
ls themes ls themes
| each { |it| ' "' + ($it.name | path parse | get stem) + '" = import ./' + $it.name + ";" } | each { |it| ' "' + ($it.name | path parse | get stem) + '" = import ./' + $it.name + ";" }
@ -36,16 +36,16 @@ def generate-valid-themes [] {
def main [] { def main [] {
if not ("base16-schemes" | path exists) { if not ("base16-schemes" | path exists) {
echo "base16-schemes doesn't exist, cloning..." print "base16-schemes doesn't exist, cloning..."
git clone https://github.com/tinted-theming/base16-schemes git clone https://github.com/tinted-theming/base16-schemes
} else { } else {
echo "base16-schemes exists, updating" print "base16-schemes exists, updating"
cd base16-schemes cd base16-schemes
git pull git pull
cd .. cd ..
} }
echo "deleting old themes..." print "deleting old themes..."
rm -rf themes rm -rf themes
mkdir themes mkdir themes
@ -58,7 +58,7 @@ def main [] {
| each { |it| | each { |it|
let new_path = "themes/" + ($it.name | path parse | get stem) + ".nix" let new_path = "themes/" + ($it.name | path parse | get stem) + ".nix"
echo $"converting ($it.name) to ($new_path)..." print $"converting ($it.name) to ($new_path)..."
theme-to-nix (open $it.name) | save $new_path theme-to-nix (open $it.name) | save $new_path
} }