prompt-themes/bin/install.sh

22 lines
570 B
Bash
Raw Normal View History

2025-05-05 16:06:10 +03:00
#!/bin/bash
target="$HOME/.bashrc"
config_dir="$HOME/.config/prompt-theme"
config_file="$config_dir/config.yaml"
source_line="source $config_dir/bin/prompt-theme.sh"
if ! grep -Fxq "$source_line" "$target"; then
echo "$source_line" >> "$target"
echo "✅ Added prompt-theme to $target"
else
echo " prompt-theme is already sourced in $target"
fi
# copy default config file if none exists
if [[ ! -f "$config_file" ]]; then
cp "$config_dir/share/_config.yaml" "$config_file"
else
echo " Existing config.yaml found at $config_file (unchanged)"
fi