1. 9

Another related link: https://spin.atomicobject.com/2014/12/26/manage-dotfiles-gnu-stow/


  2. 3

    A problem with stow is that, very often, I only want the files to be symlinked, with the directories created rather than symlinked. Otherwise, too many applications have a habit of writing to temporary and log files within the config directories, and these files appear inside the dotfile repository, which I do not want.

    For example, my configuration file for foo is .foo/config. Unfortunately, foo will also write a file .foo/history. If I create a foo/.foo/config directory in my dotfile repo, and stow it, the ~/.foo is made into a symlink to the directory foo/.foo. So, the file ~/.foo/history actually appears under foo/.foo/log

    Stow unfortunately does not support making directories (it makes directories only if the directory is shared between another application). I currently get by with some scripting on top of stow, but it would have been nice if this could have been implemented.

    1. 8

      Unless I’m fundamentally misunderstanding something, shouldn’t stow’s “--no-folding” argument do what you want?

      1. 1

        It seems it is. My version of stow (1.3.3) seems to not to have it, and hence missed it. Thank you for pointing it out.

        1. 1

          Thank you! I also needed to know that existed. :)

        2. 2

          I sortof get around it with git and a .gitignore

          1. 2

            I also use .gitignore to deal with this, but I would prefer to have the directory structure copied and the files symlinked. Still, it works reasonably well for personal use.

            If you do this with your .emacs.d directory, the .gitignore can get extensive.

          2. 2

            rcm by thougtbot works like that by default

          3. 1

            I just made a fresh reinstall of Void Linux ontop of an old arch linux machine and I decided to try this out. It works pretty well, though I do wonder how well it works at scale.

            I should also mention I used xstow, the c++ fork of gnu stow as that was the only version in the xbps package tree.

            1. 1

              I used to use xstow like this.

              I’ve since abandoned it for using emacs+org-mode+babel to build my dot files then rsync them around. It works OK, but I’d prefer not to use symlinks for things at all anymore.