move existing dot files out of the way on init
This commit is contained in:
parent
5a01029d03
commit
a9a8ffd811
1 changed files with 5 additions and 2 deletions
7
init.sh
7
init.sh
|
|
@ -15,9 +15,12 @@ fi
|
||||||
|
|
||||||
link_config() {
|
link_config() {
|
||||||
file="$1"
|
file="$1"
|
||||||
if [ ! -e "${HOME}/.$file" ]; then
|
if [ -e "${HOME}/.$file" ]; then
|
||||||
ln -s "${CONFIG_PATH}/$file" "${HOME}/.$file"
|
mkdir "${HOME}/original-dot-files" >/dev/null 2>/dev/null
|
||||||
|
echo "Existing file found at $HOME/.$file, moving to ~/original-dot-files."
|
||||||
|
mv ".$file" original-dot-files/
|
||||||
fi
|
fi
|
||||||
|
ln -s "${CONFIG_PATH}/$file" "${HOME}/.$file"
|
||||||
}
|
}
|
||||||
|
|
||||||
cd "$CONFIG_PATH"
|
cd "$CONFIG_PATH"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue