addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgooglegroupshelp-with-circleimageimagesinstagramlinklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruserwarningyahoo

[ruby-81] Directory transclusion fantasy

From: Loqi
Sent on: Friday, July 24, 2009 8:07 PM
At the meetup, I mentioned a problem I'm having, but I don't think I 
explained it very well. I'm sure there's a simple, standard solution 
that everyone is using, but I don't know it.

What I'd like to do is to somehow transclude the content of one 
directory with everything inside it into another directory somewhere 
else on the filesystem. If it were legal to have a hard link of a 
directory in Unix, that would be an ideal solution.

What I'd like to have is something like this:

plugins_written_by_m­e
   my_plugin
     a bunch of files and directories  <-- I want to edit at will

my_rails_project
   vendor
     plugins
       my_plugin
         a bunch of files and directories  <-- I want to edit at will

my_other_rails_proje­ct
   vendor
     plugins
       my_plugin
         a bunch of files and directories  <-- I want to edit at will

If I could somehow make each Rails project's plugins directory have a 
hardlink to the plugin working directory, then I could freely edit 
anything anywhere, anytime. And since there's only one copy, nothing 
ever gets out of sync. Furthermore, if I copy any such project across 
the network, it would just grab the current copy of everything, not 
an empty link. In short, it should look just like three separate 
copies that always stay identical.

I don't think this is possible, so I'd like the best approximation 
for Mac OSX. The best I could do is make three copies of the plugin, 
and cut my own edit privilege from two of them as a reminder to edit 
only the master copy, but this is quite cumbersome. Some of my big 
data files that change often are hardinked from multiple places. I 
could painstakingly hardlink all the non-directory files in the 
plugin, but that seems insane too.

Any ideas?

Our Sponsors

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy