[feat] add link script
This commit is contained in:
parent
034c3500e3
commit
adb1f36c83
@ -20,3 +20,5 @@
|
||||
br = branch
|
||||
[mergetool]
|
||||
keepBackup = false
|
||||
[core]
|
||||
editor = vim
|
||||
|
26
mklink.sh
Executable file
26
mklink.sh
Executable file
@ -0,0 +1,26 @@
|
||||
#!/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 [ ! -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"
|
Loading…
Reference in New Issue
Block a user