Source

dotfiles / getdotfiles

Full commit
#! /bin/bash
# Update from repo to local

# source
DOTFILEDIR=~/dev/dotfiles
. ${DOTFILEDIR}/basedotfiles

# At first: Backup!
mkdir -p ${BACKUPDIR}
for ((i=0; i<${#files[@]}; i++)); do
    cp -R -t ${BACKUPDIR}/${fileDirs[$i]} ${files[$i]} 
done

# Copy back
# TODO: Find nicer solution!
# 1. Remove backup files
rm_bkpfiles
# 2. Copy dotfiles (except awesome and hg)
find ${DOTFILEDIR} . \( -name '.*' ! -name '.hg*' \) -exec cp -R -f {} ~ \;
# 3. Copy awesome
cp -R -f ${DOTFILEDIR}/awesome-config/* ~/.config/awesome/