Work on dotdiles
This commit is contained in:
parent
8954b21d7f
commit
0e82e48614
14 changed files with 465 additions and 614 deletions
53
symlinks.sh
53
symlinks.sh
|
@ -1,26 +1,57 @@
|
|||
#!/usr/bin/sh
|
||||
|
||||
# Simple shell script to symlink my dotfiles to their place in the system
|
||||
|
||||
#whether to use -f when creating symlnk
|
||||
force=false
|
||||
#Ask if files should be overiten
|
||||
read -n1 -p "Do you want to overide files if they exist? [y/N] " answer
|
||||
|
||||
#If anser is y or Y then they should be ovewriten
|
||||
#Anything else and they shouldn't
|
||||
if [[ "$answer" == "y" || "$answer" == "Y" ]]; then
|
||||
force=true
|
||||
fi
|
||||
|
||||
# A wrapper around ln which will force if necesary
|
||||
function myLink(){
|
||||
if $force; then
|
||||
/usr/bin/ln -sf "$1" "$2"
|
||||
echo "forced $2 -> $1"
|
||||
else
|
||||
/usr/bin/ln -s "$1" "$2"
|
||||
fi
|
||||
}
|
||||
|
||||
#ZSH
|
||||
ln -s ~/.dotfiles/shells/zsh/zprofile ~/.zprofile
|
||||
ln -s ~/.dotfiles/shells/zsh/zshrc ~/.zshrc
|
||||
ln -s ~/.dotfiles/shells/zsh/zshrc ~/.zshrc.pre-oh-my-zsh
|
||||
myLink $HOME/.dotfiles/shells/zsh/zprofile $HOME/.zprofile
|
||||
myLink $HOME/.dotfiles/shells/zsh/zshrc $HOME/.zshrc
|
||||
myLink $HOME/.dotfiles/shells/zsh/zshrc $HOME/.zshrc.pre-oh-my-zsh
|
||||
|
||||
#bash
|
||||
ln -s ~/.dotfiles/shells/bash/bash_profile ~/.bash_profile
|
||||
ln -s ~/.dotfiles/shells/bash/bashrc ~/.bashrc
|
||||
myLink $HOME/.dotfiles/shells/bash/bash_profile $HOME/.bash_profile
|
||||
myLink $HOME/.dotfiles/shells/bash/bashrc $HOME/.bashrc
|
||||
|
||||
#X
|
||||
ln -s ~/.dotfiles/x/xinitrc ~/.xinitrc
|
||||
myLink $HOME/.dotfiles/x/xinitrc $HOME/.xinitrc
|
||||
|
||||
#Git
|
||||
ln -s ~/.dotfiles/git/gitconfig ~/.gitconfig
|
||||
myLink $HOME/.dotfiles/git/gitconfig $HOME/.gitconfig
|
||||
|
||||
#i3
|
||||
mkdir -p ~/.config/i3
|
||||
ln -s ~/.dotfiles/i3/config ~/.config/i3/config
|
||||
mkdir -p $HOME/.config/i3
|
||||
myLink $HOME/.dotfiles/i3/config $HOME/.config/i3/config
|
||||
|
||||
#vim
|
||||
ln -s ~/.dotfiles/vim ~/.vim
|
||||
ln -s ~/.dotfiles/vim/.vimrc ~/.vimrc
|
||||
myLink $HOME/.dotfiles/vim $HOME/.vim
|
||||
myLink $HOME/.dotfiles/vim/.vimrc $HOME/.vimrc
|
||||
|
||||
#rofi
|
||||
myLink $HOME/.dotfiles/rofi $HOME/.config/rofi
|
||||
|
||||
#Templates
|
||||
myLink $HOME/.dotfiles/Templates $HOME/Templates
|
||||
|
||||
#Pandoc
|
||||
myLink $HOME/.dotfiles/pandoc $HOME/.pandoc
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue