stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shaheedur Haque (shahhaqu)" <shahh...@cisco.com>
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 [dineshb@wso2.com]
Sent: 21 April 2014 04:09
To: dev@stratos.incubator.apache.org
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 <udara@wso2.com<mailto:udara@wso2.com>>
wrote:

+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" <afkham@gmail.com<mailto:afkham@gmail.com>>
wrote:
+1. This would be a great addition.


On Sat, Apr 19, 2014 at 8:32 PM, chris snow <chsnow123@gmail.com<mailto:chsnow123@gmail.com>>
wrote:
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,

Chris

---
[1] https://google-styleguide.googlecode.com/svn/trunk/shell.xml



--
Afkham Azeez
Director of Architecture; WSO2, Inc.; http://wso2.com,
Member; Apache Software Foundation; http://www.apache.org/

email: azeez@wso2.com<mailto:azeez@wso2.com> cell: +94 77 3320919<tel:%2B94%2077%203320919>
blog: http://blog.afkham.org
twitter: http://twitter.com/afkham_azeez
linked-in: http://lk.linkedin.com/in/afkhamazeez

Lean . Enterprise . Middleware




--
Dinesh Bandara
Software Engineer
WSO2 Inc.; http://wso2.com<http://wso2.com/>
lean.enterprise.middleware


Mime
View raw message