fix: modify fish/git init script

This commit is contained in:
2024-06-08 16:24:22 +08:00
parent f0186eaefb
commit fd96710321
4 changed files with 25 additions and 8 deletions
+16
View File
@@ -0,0 +1,16 @@
#!/bin/bash
echo 'Link fish config file'
if [ -f "$HOME/.config/fish/config.fish" ]; then
mv $HOME/.config/fish/config.fish $HOME/.config/fish/config.fish.bak
fi
ln -s $HOME/.dotfile/fish/config.fish $HOME/.config/fish/config.fish
echo 'Sourcing'
source ~/.config/fish/config.fish
echo 'Set fish as default shell'
fishpath=$(which fish)
echo $fishpath | sudo tee -a /etc/shells
chsh -s $fishpath
-4
View File
@@ -1,4 +0,0 @@
#!/bin/bash
echo /usr/local/bin/fish | sudo tee -a /etc/shells
chsh -s /usr/local/bin/fish
+9
View File
@@ -0,0 +1,9 @@
#!/bin/bash
echo 'Init git config'
src=$HOME/.gitconfig
if [ -f $src ]; then
mv $src $src.bak
fi
ln -s $HOME/.dotfile/git/.gitconfig $src