[x264-devel] [PATCH 1/2] version.sh: add resilience
BugMaster
BugMaster at narod.ru
Thu Sep 5 10:40:35 CEST 2013
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: command.diff
Type: application/octet-stream
Size: 429 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20130905/aa1bb8c0/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: type.diff
Type: application/octet-stream
Size: 423 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20130905/aa1bb8c0/attachment-0001.obj>
More information about the x264-devel
mailing list