diff --git a/home/dotfilesrc b/home/dotfilesrc index 2652706..5579fb7 100644 --- a/home/dotfilesrc +++ b/home/dotfilesrc @@ -1,6 +1,6 @@ # dotfiles locations DOTFILES_HOME_DIR="$(cd -P "$(dirname "$(readlink ~/.dotfilesrc)")" && pwd)" -DOTFILES_ROOT_DIR="$( dirname "$DOTFILES_HOME_DIR" )" +DOTFILES_ROOT_DIR="$(dirname "$DOTFILES_HOME_DIR")" DOTFILES_ZSH_DIR="$DOTFILES_ROOT_DIR/zsh" DOTFILES_BASH_DIR="$DOTFILES_ROOT_DIR/bash" DOTFILES_SHELL_DIR="$DOTFILES_ROOT_DIR/shell" diff --git a/setup.sh b/setup.sh index f779b22..e8ef87c 100755 --- a/setup.sh +++ b/setup.sh @@ -1,17 +1,19 @@ #!/bin/sh -[ $(pwd) = "$HOME/.dotfiles" ] || ln -sfn "$(pwd)" "$HOME/.dotfiles" - for file in home/*; do dotfile="$(basename "$file")" case "${dotfile}" in Makefile|*.md|LICENSE|setup.sh) - # NOOP + : # NOOP ;; *) - # link the file with a leading dot - echo "linking ${dotfile}" - ln -sf "$(pwd)/${file}" "$HOME/.${dotfile}" + if [ -d "${dotfile}" ]; then + : + else + # link the file with a leading dot + echo "linking ${dotfile}" + ln -sf "${PWD}/${file}" "$HOME/.${dotfile}" + fi ;; esac done