[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH] automation: add linker symbol name script



Le mer. 24 juil. 2024 à 21:56, Jason Andryuk <jason.andryuk@xxxxxxx> a écrit :
>
> On 2024-07-24 13:48, Lira, Victor M wrote:
> >
> > On 7/24/2024 12:44 AM, Jan Beulich wrote:
> >> Nit: In names of new files we prefer - over _.
> >> +script_name=`basename "$0"`
> > I have fixed the above comments in v2.
> >
> >>> +#!/bin/bash
> >> Can we rely on bash to be there and at that location? As you using any
> >> bash-isms in the script which cannot be avoided?
> >
> > Are the automation scripts required to be portable? Can you please point
> > me to a resource where I can learn how to make the script portable?
>
> Hi Victor,
>
> You might want to check out `checkbashisms`:
>
> $ checkbashisms
> Usage: checkbashisms [-n] [-f] [-x] [-e] [-l] script ...
>     or: checkbashisms --help
>     or: checkbashisms --version
> This script performs basic checks for the presence of bashisms
> in /bin/sh scripts and the lack of bashisms in /bin/bash ones.
>
> Since your script has '#!/bin/bash', you'd run it with -f to force the
> bashism checks (or change to /bin/sh first).

Just for completeness, you could also use shellcheck.

https://www.shellcheck.net/

I haven't tried checkbashisms so I can't really provide any comparison
between the two.

Cheers,

-- 
Julien Grall



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.