added create-skript
This commit is contained in:
parent
e6d648f8ce
commit
149859618b
32
create.sh
Normal file
32
create.sh
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# if the dotfile already exist and it is NOT a symbolic link,
|
||||||
|
# make a rename to save it and replace with an symbolic link to
|
||||||
|
# $HOME/dotfiles/$FILE
|
||||||
|
|
||||||
|
function create_link {
|
||||||
|
if [ -e $HOME/$1 ]
|
||||||
|
then
|
||||||
|
if [ ! -h $HOME/$1 ]
|
||||||
|
then
|
||||||
|
mv $HOME/$1 $HOME/$1
|
||||||
|
ln -s $HOME/dotfiles/$1 $HOME/$1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
create_link .bash_aliases
|
||||||
|
create_link .bash_profile
|
||||||
|
create_link .bashrc
|
||||||
|
create_link .bashrc_local
|
||||||
|
create_link .tmux.conf
|
||||||
|
|
||||||
|
if [ -d $HOME/.vim ]
|
||||||
|
then
|
||||||
|
if [ ! -h $HOME/.vim ]
|
||||||
|
then
|
||||||
|
mv $HOME/.vim $HOME/.vim.orig
|
||||||
|
ln -s $HOME/dotfiles/.vim $HOME/.vim
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
create_link .vimrc
|
||||||
Loading…
Reference in New Issue
Block a user