[x264-devel] [PATCH 1/2] version.sh: add resilience

Sean McGovern gseanmcg at gmail.com
Thu Sep 5 15:17:54 CEST 2013


On Thu, Sep 5, 2013 at 4:40 AM, BugMaster <BugMaster at narod.ru> wrote:

> On Wed, 4 Sep 2013 20:04:19 -0400, Sean McGovern wrote:
>
>
>
> > On Wed, Sep 4, 2013 at 6:49 PM, BugMaster <BugMaster at narod.ru> wrote:
> > On Wed, 4 Sep 2013 17:44:13 -0400, Sean McGovern wrote:
>
> >> OK, I will fix it to probe for git first. Thanks for spotting that.
>
> >> -- Sean McG.
>
> > I fixed it already. Check that you ok with version in
> >
> https://github.com/DarkShikari/x264-devel/commit/5ad7207acbaa042a6a89042b26257ab55dd26eb3
>
>
> > We're still potentially trading for noisiness again on standard out when
> the tool isn't found.
>
> > From my Solaris 11 box:
>
> > sean at nyaruko:~$ which blah
> > no blah in /usr/xpg6/bin /usr/xpg4/bin /usr/bin /usr/gnu/bin
> /home/sean/bin
> > sean at nyaruko:~$ which blah 2>/dev/null
> > no blah in /usr/xpg6/bin /usr/xpg4/bin /usr/bin /usr/gnu/bin
> /home/sean/bin
>
> > I was hoping it was on standard error, it's not.
>
> > Still, a step in the right direction.
>
> > Maybe type(1) would be better than which(1)? It's a bash-builtin so
> > not sure how portable it is to other shells.
>
> > -- Sean McG.
>
> Ok. After reading
>
> http://stackoverflow.com/questions/592620/check-if-a-program-exists-from-a-bash-script
> I agree that uses of `which` was bad idea. So according to this
> article it is preferable to use `command -v` or `type` commands. But I
> am not sure which one to prefer. `command -v` looks like most POSIX
> complaint but -v is optional.
>

'type' looks POSIX compliant to me. :)

See http://pubs.opengroup.org/onlinepubs/9699919799/utilities/type.html

-- Sean McG.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20130905/85eac5d9/attachment.html>


More information about the x264-devel mailing list