Re: [Tracker] Migrating tracker-utils/ into one 'tracker' command



On 06/10/14 14:51, Philip Van Hoof wrote:
if (strcmp($name, "control") == 0) {
        if (argv[2] in options for index) {
                use index for argv[1]
        }
        if (argv[2] in options for daemon) {
                use daemon for argv[1]
        }
        if (argv[2] in --hard, --soft or --config) {
                use reset for argv[1]
        }

        etc
}

If only it was this simple ;)

a) options have long and short versions
b) options can be specified in one go (e.g. -abc)
c) some options can't be used together any more because they're split
   into two different areas, making argv mangling quite a bit harder.
   (e.g. 'tracker-control -rs' is now 'tracker reset -r | --hard' and
    'tracker daemon -s'). Actually this has been making me think we
   should have a way to start the daemons after a reset to make life
   easier (as it is now).

I'm sure there are other things I've not considered too...

I will admit most of the commands are quite easy, but the tracker-control cases are not.

--
Regards,
Martyn

Founder & Director @ Lanedo GmbH.
http://www.linkedin.com/in/martynrussell


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]