petejkim / autoparts

package manager for nitrous.io
BSD 2-Clause "Simplified" License
81 stars 84 forks source link

Add git-extras #165

Open gabrielalmeida opened 10 years ago

gabrielalmeida commented 10 years ago

https://github.com/visionmedia/git-extras Nice utility for those who manage git repos at Nitrous boxes..

jeffjewiss commented 9 years ago

I tried creating a package for TJ's git extras, however, due to this line I don't think it's possible without sudo access since the action user can't create files in /etc.

@gmckeever am I missing something, is there a way to create a file in /etc via an autoparts package installation step?

The alternative would be to fork the repo and tag a new release that doesn't have bash completion, but that seems like a hack.

gmckeever commented 9 years ago

There isn't any way to write to /etc or outside of the home folder, but there could be a workaround for this.

One workaround I am thinking of is to use the inreplace method seen in the git-extras Homebrew package:

https://github.com/Homebrew/homebrew/blob/800842eec1d9633ee95c5e003e5a8813eeae0739/Library/Formula/git-extras.rb

You would need to drop in the entire method to the Autopart package if you wanted to utilize this:

https://github.com/Homebrew/homebrew/blob/800842eec1d9633ee95c5e003e5a8813eeae0739/Library/Homebrew/utils/inreplace.rb

jeffjewiss commented 9 years ago

If I'm understanding this correctly, inreplace would alter the Makefile so that the bash completion files are placed inside the prefix_path instead of in /etc/bash_completion.d/.

I gave this a shot, but it looks like Pathname.atomic_write is custom to Homebrew.

Thoughts?