#!/bin/sh

for linkfile in ${@:-$(find .dotfiles -type f -name *-links)}; do
    echo "# processing linkfile $linkfile..."
    for link in $(cat $linkfile); do
        echo "# unlinking $link..."
        unlink $link
    done
    rm -rf $linkfile
done