Re: [Bashburn-info] Fix up misc/check_path.sh
Brought to you by:
bashburn
From: Nick W. <ni...@li...> - 2008-09-30 08:38:59
|
On Tue, 30 Sep 2008 08:07:51 +0100 Nick Warne <ni...@li...> wrote: > > I noticed this wasn't working right - I was told I had to install > missing apps even if I had them all. > > Looking at this, it was sooooooo convoluted logic the way a missing > app was looked at. Putting echoes in, I was getting 14 apps found > and 25 nr_apps. > > Also, I haven't a clue what this line did: > > nr_apps=$(( ${#BBBURNING} + ${#BBRIPPERS} + ${#BBXCODERS} + > ${#BBMISC} )) > > Anyway, it is now fixed - easy to read and will always work, no matter > how many apps are added at a later date. > > The function is already THERE to test if an app exists. All we need > to do is count the MISSING ones. If after the function, > bb_not_found_apps != 0, then we know (but don't care which, the > function deals with that) apps are missing, and thus just print the > warning. > > Oh, also the reason I looked at this file was to add a 'clear' so the > display is all nice when the paths are printed to stdout. OK, I tweaked this a bit more. Only a flag is needed if an app is missing, no counting required. Works and looks good now. Nick -- Free Software Foundation Associate Member 5508 |