I tried to use a bare git repo to version my dotfiles and my config files but I ended not liking it very much (I don't like to mess so much with the git working directory).
This is my first try on a custom setup, the local copies of the "scripts" and "dotfiles" repositories can be stored wherever on the system and this two command automatically linkup all the files to their target location using a custom comment format in the script files.
-
The following script automatically symlinks all scripts to the correct directories with a declaration like
# TARGET_PATH=<path>
where
<path>
is the path of the future symlink. The link path can contain~
and will automatically be replaced with the value of$HOME
. -
The
dotfiles-link
command also keeps a list of tracked files in~/.cache/dotfiles/tracked
that is used by this script to automatically delete broken symlinks when a tracked file goes missing.