foo as in "pity da"

Dec 30, 2008 16:20

Yargh. Anyone know how to express "this path and everything inside it" as a variable in bash?

I have a directory ~/src/api/branches that contains a bunch of SVN-controlled directories (foo and bar, let us say, uncreatively.) A sample path where I might be working is /~src/api/branches/foo/tools/templates/baz.php. I'm trying to mod a file ~/.current to let me search only that working copy (by getting glimpse to index it.)

Two things need to happen.
1) need to maintain separate glimpse indices for everything in the branches folder (already have a crontab set up to reindex some directories nightly; will just add to that)
2) need to create some sort of ... environment variable? that points to ~/src/api/branches/CURRENT and recurses through CURRENT. I don't think the result of pwd is what I want because I want this variable to have the value "foo" when I am in, say, foo/tools/templates/.

any help much appreciated. caladri especially. <3

also, decided to go with the aforementioned sewing machine (the cheap one, not the shiny-awesome eats-leather-for-snacks one) as it sounds like presser foot cross-compatibility is not as big a deal as I thought. Shiny things will not make my life better?
Previous post Next post
Up