add backup script, cleanup link script

* add initial stab at a backup script to copy existing files to a backup directory
* clean up unused code in link.sh
This commit is contained in:
Nick Nisi
2016-04-01 10:45:29 -05:00
parent 9e841588b6
commit 794dc843b3
2 changed files with 30 additions and 3 deletions

View File

@@ -6,7 +6,7 @@ echo -e "\nCreating symlinks"
echo "=============================="
linkables=$( find -H "$DOTFILES" -maxdepth 3 -name '*.symlink' )
for file in $linkables ; do
target="$HOME/.$( basename $file ".symlink" )"
target="$HOME/.$( basename $file '.symlink' )"
if [ -e $target ]; then
echo "~${target#$HOME} already exists... Skipping."
else
@@ -47,8 +47,6 @@ vimfiles[~/.vim]=$DOTFILES/config/nvim
vimfiles[~/.vimrc]=$DOTFILES/config/nvim/init.vim
for file in "${!vimfiles[@]}"; do
# for file in "${(@k)vimfiles}"; do
# echo "$file -> $vimfiles[$file]"
if [ -e ${file} ]; then
echo "${file} already exists... skipping"
else