stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shaheedur Haque (shahhaqu)" <>
Subject RE: shell style guide for stratos?
Date Thu, 24 Apr 2014 23:02:00 GMT

IMHO, more important that the style guide would be some consistent approach to error handling.
FWIW, we try to use a block of statements like this in each shell script:

declare infomsg=%%${0##*/}-Info:
declare errmsg=%%${0##*/}-Error:
set -o pipefail
set -o errtrace
set -o nounset
trap "echo $errmsg trap on error near line \$LINENO; exit 1" ERR

I'm sure others have their favourites too...

From: Dinesh Bandara []
Sent: 21 April 2014 04:09
Subject: Re: shell style guide for stratos?

+1. this will added standards to stratos shell scripts.

On Sun, Apr 20, 2014 at 8:14 PM, Udara Liyanage <<>>

+1 that style is good I think.

Touched, not typed. Erroneous words are a feature, not a typo.a

On Apr 20, 2014 10:46 AM, "Afkham Azeez" <<>>
+1. This would be a great addition.

On Sat, Apr 19, 2014 at 8:32 PM, chris snow <<>>
Hi Guys,

What do you think to aligning with google's shell style guide [1] for
Stratos shell scripts?

Is there a better style guide that you are aware of?

Many thanks,



Afkham Azeez
Director of Architecture; WSO2, Inc.;,
Member; Apache Software Foundation;

email:<> cell: +94 77 3320919<tel:%2B94%2077%203320919>

Lean . Enterprise . Middleware

Dinesh Bandara
Software Engineer
WSO2 Inc.;<>

View raw message