#!/bin/sh

cd "$HOME"
for FILE in config/*; do
    pushd "$HOME"
    DOTFILE=".${FILE##*/}"
    if [[ -e "$DOTFILE" ]]; then
        mkdir original-dot-files >/dev/null 2>/dev/null
        echo "Existing file found at $DOTFILE, moving to ~/original-dot-files."
        mv "$DOTFILE" original-dot-files/
    fi
    ln -s "$FILE" "$DOTFILE"
    popd
done
