D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Long bash scripts

 

On Tuesday 25 January 2005 7:45 am, Darke, Clive wrote:
 >I'm not using goto, I'm using if [ $jump < 40 ] then
...
fi

Why do so few people use double brackets? [[ ... ]] are so much more
powerful than Bourne style singles.

Don't know, I've never used double. Come to that, I haven't come across a bash 
script that I needed to edit that used double either.

This might be a good case for restructuring the code around functions...

Clive

This isn't a big deal, it's a personal let's-save-some-time script that stops 
me having to sit here waiting for 2 consecutive export+build operations of 4 
different projects with rudimentary error handling. If you feel it would be a 
lot better with functions, by all means take a look at the code as it is now 
- the single bracket version will be in the next tarball, the current version 
has to be run from the beginning every time:
http://code.neil.williamsleesmill.me.uk/qofqsf.html#AEN212
Tarball: qof-qsf14-01-05.tar.gz (148K) 
Signature qof-qsf14-01-05.tar.gz.asc
patches/scripts/working/automate.sh

The next tarball should be ready today, it'll be listed on the same page when 
ready.

Let me know. Currently, there are only two people needing the script and one 
of those would have to edit the multiple cd calls to his filesystem. The next 
version really should use a $prefix that is set in the script so that it's 
only one edit.

-- 

Neil Williams
=============
http://www.dcglug.org.uk/
http://www.nosoftwarepatents.com/
http://sourceforge.net/projects/isbnsearch/
http://www.neil.williamsleesmill.me.uk/
http://www.biglumber.com/x/web?qs=0x8801094A28BCB3E3

Attachment: pgp00074.pgp
Description: PGP signature