Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support nested recurse installs #39

Open
erikw opened this issue Nov 2, 2021 · 0 comments
Open

Support nested recurse installs #39

erikw opened this issue Nov 2, 2021 · 0 comments

Comments

@erikw
Copy link

erikw commented Nov 2, 2021

Hey,

Background

I have a use case where the .dfminstall's recurse is not working like I hope it would. Normally there is not data in $XDG_DATA_HOME (default: ~/.local/share) but I happen to have a few files that I actually want to have managed by git in my dotfiles repo that should integrate with existing file in this installation destination. Using recurse install works fine for me e.g. to merge existing contents in my $HOME/bin with the folder bin/ in my dotfiles repo with a line like bin recurse in .dfminstall.

The issue is that it does not seems to work to recurse install in this case as there is a directory depth of 2 directories.
I have in my dotfiles repo some files in .local/share/... and would like them to be symlinked in to the existing $HOME/.local/share, without touching anything in $HOME/.local/* or $HOME/.local/share*. The existing files must stay as they are not managed by the dotfiles git repo.

Minimal Example

I was experimenting a bit with different .dfminstall settings but could not get it to work. As it's quite a lot to clean up after the experiment, I made a minimal example with a different path here.

Before $ dfm install

$ tree $HOME/.test
.test
├── other
│   └── file1
└── share
    └── file2
$ tree path/to/dotfiles/.test
.test
└── share
    └── file3
$ cat path/to/dotfiles/.dfminstall
[...]
.test/share recurse

$dfm install

INFO: Installing dotfiles...
INFO:   Backing up .test.
INFO:   Symlinking .test (path/to/dotfiles/.test).
INFO:   Backing up file3.
INFO:   Symlinking file3 (../../path/to/dotfiles/.test/share/file3).
INFO:   Backing up .backup.
mv: rename .backup to $HOME/.test/share/.backup/.backup: Invalid argument
INFO:   Symlinking .backup (../../path/to/dotfiles/.test/share/.backup).

After $ dfm install

$ tree -A $HOME/.test
.test
└── share
    ├── .backup
    │   └── file3
    └── file3 -> ../../path/to/dotfiles/.test/share/file3
$ tree -a $HOME/.backup
.backup
└── .test
    ├── other
    │   └── file
    └── share
        └── file2

Expected outcome after $dfm install

$ tree $HOME/.test
.test
├── other
│   └── file1
└── share
    └── file2
    └── file3 -> ../../path/to/dotfiles/.test/share/file3

Notes

I tried all in all the following settings in .dfminstall:

     .test/share recurse
     .test recurse
     .test recurse
     .test/share recurse

and the all yielded a bit different outcome, but none like the expected!

Would it be possible to support this use case with dfm? 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant