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

adopt single file? #24

Open
josephholsten opened this issue Sep 12, 2017 · 1 comment
Open

adopt single file? #24

josephholsten opened this issue Sep 12, 2017 · 1 comment
Labels
adopt Issues with --adopt option enhancement help wanted

Comments

@josephholsten
Copy link

I'm writing a tool to act similarly to https://github.com/lra/mackup, but without reinventing any of stow's features. But I'm afraid I'm reinventing stow's adoption logic to allow me to adopt a single file into a package.

Is there a way to do this presently? If so, could we add it to the doc? If not, would we be interested in adding it?

I'm not quite sure how far down the path of #19 I want to go, but mackup's database currently contains many directories, so I'll be figuring out some sort of approach.

As to why this is less terrible than mv $target_dir/bin $stow_package, I'm not sure it is. But here's some of the logic I'm currently using:

  • verify that the target_dir file is not a symlink (which needs to be smarter, it should actually check if it's a non-stow symlink)
  • verify that the stow_package contains the appropriate parent dirs (essentially mkdir -p $(dirname ...))
  • require a flag to overwrite a file (I want to add a diff comparison tool)
@aspiers
Copy link
Owner

aspiers commented Jun 28, 2019

Yikes, really sorry for the slow reply - not sure how I missed this one for so long. Yes, your three items sound like valid reasons for this feature, and indeed for #19 too. I'd definitely be willing to consider adding this.

@aspiers aspiers added the adopt Issues with --adopt option label Apr 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adopt Issues with --adopt option enhancement help wanted
Projects
None yet
Development

No branches or pull requests

2 participants