On Sun, Mar 30, 2003 at 10:39:32AM +1200, Daniel Fone wrote:
> Well, great news on the coding front. I have finished my first linux app. The 
> command "quote" now outputs a random line from the text file "/etc/quotes". I 
> am using this for my KMail signature so be sure to take a look down the 
> bottom, it will be randomly selected each time an e-mail is sent.

Hmm.. strikes me as interested why you dont use fortune... very easy to set
up custom fortune files.

For a learning experience, I guess, this was a pretty good one.

> As you can see, I have put the quote file in /etc and I have put the binary in 
> /bin. Is there any reason why I shouldn't do this? I have hardcoded the path 
> to the quote file as /etc/quotes as I can't think of any better way to do it. 

As has been mentioned, binary in /usr/bin, data in /var, if it's *variable*,
as in, it changes dynamically. or /usr/share/<program>/ if it's architecture
independent (text is), or /usr/lib/<program>/ if not.

Your program could also be clever, and have an option for which file, or
search in some common locations.. /usr/local/share/ /usr/share/ ~/.quote/ ?

> Also, how do I go about distributing my program? I think an RPM is *way* over 
> the top and there is only one source file so a configure script is also not 
> very necessary.

Just a .tar.gz with a copy of the license you chose, a Makefile, and and
example data file.

> Future releases plan to include command line arguments for adding quotes to 
> your quotes file, also arguments determining the format in which the quote is 
> returned.

Sounds like normal development :)

Mike.
-- 
Mike Beattie <[EMAIL PROTECTED]>                      ZL4TXK, IRLP Node 6184

         Never put off until tomorrow what you can avoid altogether.

Reply via email to