mirror of
https://github.com/dchakro/alacritty_colors.git
synced 2026-05-17 10:12:17 -07:00
Convert themes to TOML
This commit is contained in:
parent
a08af95bd4
commit
7f833712b2
1 changed files with 14 additions and 9 deletions
|
|
@ -16,16 +16,21 @@
|
|||
|
||||
# shopt -s globstar
|
||||
cd themes
|
||||
if command -v yj > /dev/null 2>&1; then
|
||||
# For each .yaml file in the current directory
|
||||
for yaml_file in *.yml; do
|
||||
# Use basename to get the file name without the .yaml extension
|
||||
base_name=$(basename "$yaml_file" .yml)
|
||||
if command -v sd > /dev/null 2>&1; then
|
||||
if command -v yj > /dev/null 2>&1; then
|
||||
# For each .yaml file in the current directory
|
||||
for yaml_file in *.yml; do
|
||||
# Use basename to get the file name without the .yaml extension
|
||||
base_name=$(basename "$yaml_file" .yml)
|
||||
|
||||
# Convert .yaml to .toml using yj
|
||||
cat "$yaml_file" | yj -yt > "${base_name}.toml"
|
||||
done
|
||||
# Convert .yaml to .toml using yj
|
||||
cat "$yaml_file" | yj -yt | sd "^.*_background.*\r?\n" "" | sd "^.*_foreground.*\r?\n" "" > "${base_name}.toml"
|
||||
done
|
||||
else
|
||||
echo "Get yj from: https://github.com/sclevine/yj"
|
||||
fi
|
||||
else
|
||||
echo "Get yj from: https://github.com/sclevine/yj"
|
||||
echo "Get sd from: https://github.com/chmln/sd"
|
||||
fi
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue