[Ffmpeg-devel] bash substitutions
matthieu castet
castet.matthieu
Sun Dec 18 10:43:22 CET 2005
Jacob Meuser wrote:
> revision 1.217 of configure added some shell substitutions.
> these apparently only work with bash, which is _not_ the /bin/sh
> on all systems.
>
> specifically:
>
> echo "SPPMAJOR=${lavc_version/.*/}" >> config.mak
> echo "LAVCMAJOR=${lavc_version/.*/}" >> config.mak
> echo "LAVFMAJOR=${lavf_version/.*/}" >> config.mak
> echo "LAVUMAJOR=${lavu_version/.*/}" >> config.mak
>
> this not work with pdksh, which is the /bin/sh on OpenBSD.
> I doubt it works with ash, which is the /bin/sh on NetBSD.
>
And dash on debian.
> I suggest the following patch.
>
you could use on sh :
${parameter%word}
${parameter%%word}
${parameter#word}
${parameter##word}
Something like ${lavu_version%%.[^.]*} should work
Matthieu
More information about the ffmpeg-devel
mailing list