From 77db37d3506edd006c0d4edc8b216d869a06f30b Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 31 May 2021 00:57:13 +0900 Subject: fish shell --- setup.sh | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'setup.sh') diff --git a/setup.sh b/setup.sh index d4d8cf1..dd68908 100755 --- a/setup.sh +++ b/setup.sh @@ -1,12 +1,17 @@ -#!/bin/sh +#!/bin/bash -for name in .gitconfig .vim .vimrc .zshrc -do - ln -s -f ~/dotfiles/$name ~/$name +for name in .gitconfig .vim .vimrc .zshrc; do + if [ ! -L ~/$name ]; then + ln -s -f ~/dotfiles/$name ~/$name + fi done -[ -d ~/.config ] || mkdir ~/.config -for name in alacritty git starship.toml -do - ln -s -f ~/dotfiles/.config/$name ~/.config/$name +if [ ! -d ~/.config ]; then + mkdir ~/.config +fi + +for name in alacritty fish git starship.toml; do + if [ ! -L ~/.config/$name ]; then + ln -s -f ~/dotfiles/.config/$name ~/.config/$name + fi done -- cgit v1.2.3-70-g09d2