Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 59 lines (47 sloc) 1.2 KB
#!/usr/bin/env bash
set -e
source $(dirname $0)/dot_functions.sh
directory_warning
# Ensure presence of directory for vim undo files
undo_dir_path="Library/Vim/undo"
if [ ! -d $HOME/$undo_dir_path ]; then
create_notice "~/$undo_dir_path" "absent"
mkdir -p $HOME/$undo_dir_path
else
skip_notice "~/$undo_dir_path" "exists"
fi
# Copy *.local files
for dotfile in .*.local ; do
dotmatrix_path=$PWD/$dotfile
path="$HOME/$dotfile"
if [ ! -e $path ]; then
copy_notice $dotfile "absent"
cp $dotmatrix_path $path
else
skip_notice $dotfile "exists"
fi
done
for dotfile in $(./bin/file_list.sh); do
dotmatrix_path="$PWD/$dotfile"
path="$HOME/$dotfile"
[ -e $dotmatrix_path ] || continue
if [ ! -L $path ]; then
link_notice $dotfile "absent"
ln -nfs $dotmatrix_path $path
else
skip_notice $dotfile "exists"
fi
done
# Symlink $HOME-relative files, preserving directory structure
for file in $(find custom -type f -not -name '*README*'); do
path=${file/"custom"/$HOME}
name=$(basename $file)
if [ ! -L $path ]; then
dest=$(dirname $path)
link_notice $name "absent"
mkdir -p $dest
ln -nfs $PWD/$file $dest
else
skip_notice $name "exists"
fi
done
You can’t perform that action at this time.