This commit is contained in:
2025-04-28 20:42:10 +08:00
parent 851dfaa7d2
commit b71ae393a3
3 changed files with 13 additions and 8 deletions

View File

@@ -3,7 +3,7 @@
current_dir=$(dirname $(realpath "$0"))
starship_config_file="$HOME/.config/starship.toml"
if [[ $(file $starship_config_file) ]]; then
if [ -f $starship_config_file ]; then
if $(file "$starship_config_file" | grep -q "symbolic link") ; then
if [[ $(readlink "$starship_config_file") != $(realpath "$current_dir/../starship/starship.toml") ]]; then
ln -sf "$current_dir/../starship/starship.toml" "$starship_config_file"