Re: [FFmpeg-devel] [PATCH v2 1/2] configure, etc: unify shebang usage
On Mon, 8 Apr 2024, J. Dekker wrote: In some cases, these scripts can be called directly by packagers, and some systems require the interpreter to be explicit. It is unclear to me which of the changes are needed and for what reason, please elaborate much more in the commit message. Is it possible to elaborate on "some systems require the interpreter to be explicit"? It'd be much nicer to reason about if there was a concrete example of such a case (even if it certainly is right to add the missing shebang line). The changes I see fall into these categories: - Change "#! " into "#!. Does this change have a functional effect for someone (where, and why?) or is it purely a cosmetic change? - Add a shebang line in the generated ffbuild/config.sh. This script is highly unlikely to be useful to call on its own like that, so while this probably is good for consistency I don't see it ever making a difference. - Add a shebang line in ffbuild/libversion.sh. I can see the value in calling this script directly, outside of our build system. I presume this is the actual change that makes a difference here? I don't mind the changes, but I'd prefer to split them into two separate commits; add missing shebangs (with an example of the case where it really does make a difference), vs removing extra spaces in shebangs for consistency (with explicit clarification in the commit message whether this is only for stylistic consistency or whether it does make a difference somewhere, and if it does, where). // Martin ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v2 1/2] configure,etc: unify shebang usage
In some cases, these scripts can be called directly by packagers, and some systems require the interpreter to be explicit. Signed-off-by: J. Dekker --- configure | 3 ++- doc/texidep.pl| 2 +- ffbuild/libversion.sh | 1 + tests/fate-run.sh | 2 +- tests/fate.sh | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/configure b/configure index f511fbae49..7b6f48e631 100755 --- a/configure +++ b/configure @@ -4737,7 +4737,7 @@ chmod +x $TMPE # make sure we can execute files in $TMPDIR cat > $TMPSH 2>> $logfile <> $logfile 2>&1 if ! $TMPSH >> $logfile 2>&1; then @@ -8283,6 +8283,7 @@ print_enabled_components libavformat/protocol_list.c URLProtocol url_protocols $ # Settings for pkg-config files cat > $TMPH < diff --git a/ffbuild/libversion.sh b/ffbuild/libversion.sh index a94ab58057..ecaa90cde6 100755 --- a/ffbuild/libversion.sh +++ b/ffbuild/libversion.sh @@ -1,3 +1,4 @@ +#!/bin/sh toupper(){ echo "$@" | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ } diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 9863e4f2d9..6ae0320c60 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -1,4 +1,4 @@ -#! /bin/sh +#!/bin/sh export LC_ALL=C diff --git a/tests/fate.sh b/tests/fate.sh index 07908be3a5..c5ee18de80 100755 --- a/tests/fate.sh +++ b/tests/fate.sh @@ -1,4 +1,4 @@ -#! /bin/sh +#!/bin/sh config=$1 -- 2.44.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".