#!/bin/sh CONFIG=$(find .config -type f) LOCAL=$(find .local -type f) ZSH_ENV=.zshenv; PROFILE=.profile; for f in $CONFIG $LOCAL $ZSH_ENV $PROFILE; do test "$f" -nt "$HOME/$f" && echo "updating $f" test "$f" -ot "$HOME/$f" && echo "fetching $f" test ! -e "$HOME/$f" && echo "installing $f" test ! -e "$(dirname "$HOME/$f")" && mkdir -p "$(dirname "$HOME/$f")" cp -u "$f" "$HOME/$f" cp -u "$HOME/$f" "$f" done