4 ms·
I think it would be better to use the "--no-folding" argument to stow in your update.sh script, otherwise stow will do something which I find undesired: - let'
by shock 12y ago
I think it would be better to use the "--no-folding" argument to stow in your update.sh script, otherwise stow will do something which I find undesired:
- let's say you have a file ~/dotfiles/vim-powerlinefonts/.config/fontconfig/conf.d/10-powerlinefonts.conf and you don't have the ~/.config/fontconfig directory
- when you do "stow vim-powerlinefonts" in the dotfiles directory it will create ~/.config/fontconfig as a symlink to your ~/dotfiles/vim-powerlinefonts/.config/fontconfig directory so now you can't add other fontconfig files in ~/.config/fontconfig/conf.d
- if instead you do "stow --no-folding vim-powerlinefonts" in the dotfiles directory it will create ~/.config/fontconfig/conf.d/ and there it will symlink 10-powerlinefonts.conf to ~/dotfiles/vim-powerlinefonts/.config/fontconfig/conf.d/10-powerlinefonts.conf, which is usually what you want.
- e12e 12y agoI generally prefer xstow[1] to GNU Stow (if for no other reason than that it doesn't require perl) -- and I couldn't find a reference to --no-folding -- however, at least xstow appear to do the right thing: stow $ find .. .. ../stow ../stow/a ../stow/a/c ../stow/a/c/a ../stow/a/c/b ../stow/b ../stow/b/c ../stow/b/c/c ../stow/b/c/c/a $ xstow b $ ls -l .. total 4 lrwxrwxrwx 1 e12e e12e 8 Jun 22 16:47 c -> stow/b/c drwxr-xr-x 4 e12e e12e 4096 Jun 22 16:44 stow #drumrolll... $ xstow a $ ls -l .. total 8 drwxr-xr-x 2 e12e e12e 4096 Jun 22 16:48 c drwxr-xr-x 4 e12e e12e 4096 Jun 22 16:44 stow e12e@stripe:~/tmp/stowtest/stow $ ls -l ../c total 0 lrwxrwxrwx 1 e12e e12e 13 Jun 22 16:48 a -> ../stow/a/c/a lrwxrwxrwx 1 e12e e12e 13 Jun 22 16:48 b -> ../stow/a/c/b lrwxrwxrwx 1 e12e e12e 13 Jun 22 16:48 c -> ../stow/b/c/c So as long as the symlink is managed by (xstow) -- subdirs will be created as needed. If your point was more about mixing (x)stow'ed and non-stowed files in directories, then you would still want to make sure (x)stow makes the directories, and only symlinks files. I'm not sure if there's an (easy) way to make xstow do that. [1] http://xstow.sourceforge.net/ http://xstow.sourceforge.net/
- shock 12y agoYes, I was thinking specifically about mixing stowed and non-stowed files in directories, that's why I chose the fontconfig example: it's likely that I will want to add files there that I don't want to stow/sync to other machines. I also find it cleaner using --no-folding and easier to reason about. I remember feeling surprised and not understanding what stow did the first time I used it without --no-folding. Some people might actually prefer the folding behavior, I just wanted to highlight that the default behavior might not be what one would expect.