diff --git a/scripts/install_macos.sh b/scripts/install_macos.sh index 4175610..7187941 100755 --- a/scripts/install_macos.sh +++ b/scripts/install_macos.sh @@ -24,7 +24,7 @@ fi # link alacritty dir if .config/alacritty not exist if [ ! -d ~/.config/alacritty ]; then - ln -s $DIR/alacritty/ ~/.config/ + ln -sf $DIR/alacritty/ ~/.config/ else echo "alacritty config already exist. Please backup or remove it." exit 1 @@ -32,8 +32,8 @@ fi # link nvim dir if .config/nvim not exist if [ ! -d ~/.config/nvim ]; then - ln -s $DIR/custom/ $DIR/NvChad/lua/custom - ln -s $DIR/NvChad/ ~/.config/nvim + ln -sf $DIR/custom/ $DIR/NvChad/lua/custom + ln -sf $DIR/NvChad/ ~/.config/nvim else echo "nvim config already exist. Please backup or remove it." exit 1 @@ -41,7 +41,7 @@ fi # link tmux dir if .config/tmux not exist if [ ! -d ~/.config/tmux ]; then - ln -s $DIR/tmux/ ~/.config/ + ln -sf $DIR/tmux/ ~/.config/ else echo "tmux config already exist. Please backup or remove it." exit 1 @@ -49,7 +49,7 @@ fi # link fish dir if .config/fish not exist if [ ! -d ~/.config/fish ]; then - ln -s $DIR/fish/ ~/.config/ + ln -sf $DIR/fish/ ~/.config/ else echo "fish config already exist. Please backup or remove it." exit 1 @@ -58,8 +58,8 @@ fi if [ ! -d ~/.ssh ]; then mkdir ~/.ssh fi -ln -s $DIR/ssh/config ~/.ssh/config -ln -s $DIR/ssh/id_rsa.pub ~/.ssh/id_rsa.pub +ln -sf $DIR/ssh/config ~/.ssh/config +ln -sf $DIR/ssh/id_rsa.pub ~/.ssh/id_rsa.pub # add authorized_keys into .ssh/authorized_keys if [ ! -f ~/.ssh/authorized_keys ]; then @@ -70,8 +70,8 @@ if ! grep -q "$(cat ~/.ssh/id_rsa.pub)" ~/.ssh/authorized_keys; then cat ~/.ssh/id_rsa.pub >>~/.ssh/authorized_keys fi -ln -s $DIR/gitconfig ~/.gitconfig -ln -s $DIR/mambarc ~/.mambarc +ln -sf $DIR/gitconfig ~/.gitconfig +ln -sf $DIR/mambarc ~/.mambarc brew install --quiet \ git-lfs tmux fish neovim ripgrep fzf pyenv node aliyunpan trzsz-ssh \