Use relative rather than absolute links.
authorW. Trevor King <wking@tremily.us>
Thu, 27 Sep 2012 11:27:37 +0000 (07:27 -0400)
committerW. Trevor King <wking@tremily.us>
Thu, 27 Sep 2012 12:04:37 +0000 (08:04 -0400)
This allows a single dotfiles installation to work on NFS-mounted home
directories, even if that home directory is mounted in different
locations on different machines.

dotfiles.sh

index 53dbe00c288ef39aa467d3e7942073b79ee3c998..82ff4f73c29e06bf30e2ae450996a376562072bf 100755 (executable)
@@ -257,7 +257,7 @@ function link_file()
                echo "link ${TARGET}/${FILE} to ${DOTFILES_DIR}/${REPO}/patched-src/${FILE}"
        else
                echo -n 'link '
-               "${LN}" -sv "${DOTFILES_DIR}/${REPO}/patched-src/${FILE}" "${TARGET}/${FILE}" || return 1
+               "${LN}" -rsv "${DOTFILES_DIR}/${REPO}/patched-src/${FILE}" "${TARGET}/${FILE}" || return 1
        fi
 }