On Sat, Dec 31, 2005 at 04:34:32PM +0100, Marco Molteni wrote:
> I am looking at the code to understand how it works, and I have a few
> suggestions:
> 
> 1 each file under extra (and maybe also under scripts) should have
>   a line like:
>   DESC="short description of what this plugin does"
>   this would allow:
>   1. to know what the plugin does ;-)
>   2. to generate automatically a web page (or whatever format) with
>      the description of each plugin. This would allow to have the
>      documentation updated automatically

Nice idea! We're trying to keep an updated documentation for each
plugin on the wiki at the moment.

> 2 refactor common code.
>   a lot of files have the same blurb:
> if [ -z "${LOGFILE:-}" ]; then
>     echo "This script can't run standalone."
>     echo "Please use launch.sh to execute it."
>     exit 1
> fi
> 
>   this should go in a new file as a function, say common.sh, 
>   and the existing files should source common.sh

This can go to scripts/launch.sh as other common functions already
present. I didn't make it at first because I want developers to
understand how the plugin system works. It is a must-do for the core
scripts, instead.
 
> 3 I have the feeling that img.sh and flash.sh have a lot in
>   common. They should be refactored to exploit the commonality.

Well, they're evidently similar and we can try to shrink
them. However, they're the most advanced use of the toolkit and most
often a user who really need them also need to customise them (i.e. to
change the partitioning scheme). The actual scripts are a standard
way, but they're not flexible at all. There are even magic numbers
inside.

That's the reason why I added the support for custom scripts (putting
customised scripts in scripts/custom/ or setting SCRIPTS_OVERRIDE
directory). 

In conclusion I agree to their rewrite, but I want them to be easily
understandable by a new developer who wants to learn how an image is
formatted and customise their behaviour.

> I think I can do some of this, if we agree on the direction.

You're welcome, and we're honoured :) I think that 3) is perfect for
you, so start with it if you can.

If anybody else want to work on the other two tasks, patches are
welcome.

Bye and night,
Dario

-- 
Dario Freni ([EMAIL PROTECTED])
FreeSBIE developer (http://www.freesbie.org)
GPG Public key at http://www.saturnero.net/saturnero.asc

Attachment: pgpmxrqSW1eHB.pgp
Description: PGP signature

-- 
FreeSBIE mailing list (http://www.freesbie.org)

Reply via email to