[x264-devel] Portability fix for FreeBSD - use /bin/sh instead of /bin/bash

Måns Rullgård mans at mansr.com
Fri Oct 8 11:26:38 CEST 2010


Alex Jurkiewicz <alex at bluebottle.net.au> writes:

> 2010/10/7 Måns Rullgård <mans at mansr.com>
>
>> > using '/usr/bin/env bash' would be more portable.
>>
>> Not really.  Nothing requires 'env' to reside in /usr/bin.
>>
> bash exists in /bin on Linux and /usr/local/bin on FreeBSD, whereas env
> exists in /usr/bin on both. Looking at all other Unices, I'd be surprised if
> env is located elsewhere more often than bash.

Your observation that /usr/bin/env is more common is no doubt
correct.  Nevertheless, the standard poses no requirement in this
regard, and I'd feel uneasy relying on any particular path.

As you also observed, there is nothing bash-specific in the script, so
this discussion is pointless.

FWIW, Gentoo has /usr/bin/env as a symlink to /bin/env.

-- 
Måns Rullgård
mans at mansr.com


More information about the x264-devel mailing list