Merge branch 'master' of ssh://git.trj.tw:10022/jay/dotfiles

This commit is contained in:
Jay 2021-02-22 10:00:32 +08:00
commit 687272ed26
2 changed files with 35 additions and 0 deletions

View File

@ -20,3 +20,5 @@
br = branch br = branch
[mergetool] [mergetool]
keepBackup = false keepBackup = false
[core]
editor = vim

33
mklink.sh Executable file
View File

@ -0,0 +1,33 @@
#!/bin/bash
if [ -f "$HOME/.vimrc" ]; then
# backup old file
mv "$HOME/.vimrc" "$HOME/.vimrc.old"
fi
ln -sf "`pwd`/.vimrc" "$HOME/.vimrc"
if [ -f "$HOME/.gitconfig" ]; then
# backup old file
mv "$HOME/.gitconfig" "$HOME/.gitconfig.old"
fi
ln -sf "`pwd`/.gitconfig" "$HOME/.gitconfig"
if [ -f "$HOME/.tmux.conf" ]; then
# backup old file
mv "$HOME/.tmux.conf" "$HOME/.tmux.conf.old"
fi
ln -sf "`pwd`/.tmux.conf" "$HOME/.tmux.conf"
if [ ! -d "$HOME/.ssh" ]; then
mkdir -p "$HOME/.ssh"
fi
if [ -f "$HOME/.ssh/config" ]; then
# backup old file
mv "$HOME/.ssh/config" "$HOME/.ssh/config.old"
fi
cp "`pwd`/.ssh/config" "$HOME/.ssh/config"