Martin Tithonium (tithonium) wrote,
Martin Tithonium
tithonium

Dear Lazyweb

A'ight, clearly today is NOT the day for me to be designing data structures.

Here's what I have:
An arbitrary set of directories with arbitrary content. Let's say:

website-a/foo/bar.html
website-a/foo/baz.html
website-a/foo/blah/blah/bah.html
website-b/foo/net.html
website-b/baz/bar.html

I want to turn that into a symlink farm thusly:
/somedir/foo/bar.html => website-a/foo/bar.html
/somedir/foo/baz.html => website-a/foo/baz.html
/somedir/foo/net.html => website-b/foo/net.html
/somedir/baz => website-b/baz
/somedir/foo/blah => website-c/foo/blah

That is, I want an 'optimized' symlink farm, if such a monster could be called optimized.
Amazon folks: like what apollo does.

And I want to do it in perl (I'd also accept ruby)

Anybody got something sitting around for doing that?

edit: Nevermind. Brain finally turned on.
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments