Eirik Schwenke wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Noah Kantrowitz skrev 23-06-2008 16:54:
> | On Jun 23, 2008, at 5:28 AM, Jani Tiainen wrote:
> |> So I need to do it by hand to all about 60 of my trac configs.. :D
> |>
> |> I wouldn't say it more "flexible" while upgrading, when creating new
> |> instances it might be more flexible.
> |
> | for f in `ls /var/trac`
> | do
> | echo -e '\n[inherit]\nfile = /usr/share/trac/conf/trac.ini\n' >>"/
> | var/trac/$f"
> | done
>
> Indeed. And I imagine most people running 60 parallel instances of trac would
> have a posix shell available.
>
> However, does anyone know of a "reasonable" package that would allow a
> similarly short example in python, that remained somewhat portable ?
>
> I'm not looking for something like ipython, the defunct pysh or pythonShell --
> just some helpful filesystem iterators that aren't quite as verbose as
> os.path.*
>
> Maybe a utility package that would the above be done in some reasonably
> intuitive 5-6 lines of python.
>
> Any ideas?
>
>
> (I can already hear someone snickering "perl" ;-)
I hate to do this, it's almost contra ban around here, but oh well..
cd $TRACPARENT; echo -e "\n[inherit]\nfile =
/usr/share/trac/conf/trac.ini\n" | ruby -ne 'Dir["**/trac.ini"].each
{|fn| File.open(fn, "a") {|f| f.puts($_}}'
/me ducks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---