On Sun, 30 Mar 2003 10:39, Daniel Fone wrote: > Hi guys, > > 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. > > 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? Yes, you should not put programs in /bin which are not necessary to get a machine up and running in single user mode, because for a properly set up partitions structure the the root partition is normally kept quite small. A much better place for the data-file is in the /var partition, especially if your data set is to be extensible, an alternative place is somewhere in the /usr/share file system.
The binary could go in the /usr/bin directory. There might be some people who would prefer to be able to configure the place where they put your magnum opus. Therefore you might care to learn how the GNU automake / autoconf / configure system works. > I have hardcoded the > path to the quote file as /etc/quotes as I can't think of any better way to > do it. 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. Indeed, but for the reasons mentioned above, and for the enlargement of your skill-set, I'd suggest using the GNU configuration system, and distributing the product as a quote.tar.gz file. btw, Are there any superior features of your work over and above those found in the "fortune" package? -- C. S.
