-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Very cool. Good work gentlemen.
On May 7, 2005, at 4:37 PM, Ciaran McCreesh wrote:
On Sat, 07 May 2005 22:37:22 +0200 Danny van Dyk <[EMAIL PROTECTED]>
wrote:
| During the last few months, ciaranm, ka0ttic, slarti and me have been
| working on "eclectic" [1], a modular administration and configuration
| framework for Gentoo. Eclectic is completely written in bash and
| unifies different tasks in one tool with a consistent user interfaces.
Might as well post a sample module... This one's the kernel symlink manager thingie, which I wrote mainly as a test / demo thing but it can be vaguely useful too:
http://svn.berlios.de/viewcvs/*checkout*/eclectic/trunk/modules/ kernel.eclectic
Note the ebuild-like format that should be nice and easy for everyone to
get their heads around.
So what's this like from a user perspective?
[EMAIL PROTECTED] ~ 0 2.30 $ eclectic kernel Usage: eclectic kernel <action> <options>
Standard actions: help Display help text usage Display usage information version Display version information
Extra actions: list List available kernel symlink targets set Set a new kernel symlink target show Show the current kernel symlink
[EMAIL PROTECTED] ~ 0 2.30 $ eclectic kernel show Current kernel symlink: linux-2.6.12-rc1 [EMAIL PROTECTED] ~ 0 2.10 $ eclectic kernel list Available kernel symlink targets: [1] linux-2.6.10 [2] linux-2.6.11 [3] linux-2.6.11-rc5 [4] linux-2.6.12-rc1 [EMAIL PROTECTED] ~ 0 2.01 $ sudo eclectic kernel set 1 [EMAIL PROTECTED] ~ 0 2.01 $ eclectic kernel show Current kernel symlink: linux-2.6.10
It's all in colour, of course.
But wait, it gets sneakier. Say we install a kernel-config symlink to eclectic. Then this will also work:
[EMAIL PROTECTED] ~ 0 1.50 $ kernel-config list Available kernel symlink targets: [1] linux-2.6.10 [2] linux-2.6.11 [3] linux-2.6.11-rc5 [4] linux-2.6.12-rc1
I added this sneaky little hack in that checks the binary name, and if it's foo-config or foo-update, it treats it as eclectic foo [...]. So you don't even get to whine about the stupid name :)
By the way, this could also implement GLEP 24 (consistent tool naming). See, if you run eclectic with no arguments:
[EMAIL PROTECTED] ~ 0 1.36 $ eclectic Usage: eclectic <module name> <options>
Built-in modules: help Display a help message list-modules Find and display available modules usage Display a usage message version Display version information
Extra modules:
bashcomp Manage contributed bash-completion scripts
blas Manage installed BLAS implementations.
kernel Manage the /usr/src/linux symlink
lapack Manage installed LAPACK implementations.
mailer Manage the mailwrapper profiles in /etc/mail
profile Manage the /etc/make.profile symlink
Automagically generated list of all the modules available.
*shrug* it's probably full of bugs still.
| There is a both a developer guide and a user guide as RST shipped with
| the source.
Rendered versions here for the lazy:
http://dev.gentoo.org/~ciaranm/tmp/eclectic/
| * What do we need to accomplish to get the status of an "Official | Gentoo Project" ? Is a manager voting necessary ?
I'm staying out of this one...
Oh, we have an IRC channel if you have development questions. You can figure out the name easily enough :)
-- Ciaran McCreesh : Gentoo Developer (Vim, Shell tools, Fluxbox, Cron) Mail : ciaranm at gentoo.org Web : http://dev.gentoo.org/~ciaranm
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (Darwin)
iD8DBQFCfUKiJ0rMK/3OwgsRApNMAKChukknZzvb0B/hbmigWph3/d5aiwCeKWl1 M/mVz6D7rR/+KMXNJu23myY= =AXv5 -----END PGP SIGNATURE-----
-- [email protected] mailing list
