stow icon indicating copy to clipboard operation
stow copied to clipboard

adopt single file?

Open josephholsten opened this issue 7 years ago • 1 comments

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 https://github.com/aspiers/stow/issues/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)

josephholsten avatar Sep 12 '17 22:09 josephholsten

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 avatar Jun 28 '19 15:06 aspiers