diff --git a/install b/install index 5a9f139..f9cb00c 100644 --- a/install +++ b/install @@ -15,10 +15,18 @@ dotfiles=( Xresources ) for f in "${dotfiles[@]}"; do + # don't cp pkgs directory over if [ "$f" == "pkgs" ]; then continue fi - cp -rv $f ~/."$f" + + # merge directories if already exists + if [ -d ~/.$f ]; then + echo "directory $f detected. merging..." + cp -rv $f/* ~/.$f/ + else + cp -rv $f ~/."$f" + fi done # install packages