diff mbox series

[1/3] scripts: nixify archive-source.sh

Message ID 20250408-jag-sysctl-v1-1-3f4f38b751be@kernel.org (mailing list archive)
State New
Headers show
Series scripts: Add a root dir in archve-source.sh | expand

Commit Message

Joel Granados April 8, 2025, 8:14 p.m. UTC
Use "#!/usr/bin/env bash" instead of "#!/bin/bash". This is necessary
for nix environments as they only provide /usr/bin/env at the standard
location.

Signed-off-by: Joel Granados <joel.granados@kernel.org>
---
 scripts/archive-source.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thomas Huth April 9, 2025, 9:41 a.m. UTC | #1
On 08/04/2025 22.14, Joel Granados wrote:
> Use "#!/usr/bin/env bash" instead of "#!/bin/bash". This is necessary
> for nix environments as they only provide /usr/bin/env at the standard
> location.
> 
> Signed-off-by: Joel Granados <joel.granados@kernel.org>
> ---
>   scripts/archive-source.sh | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh
> index 30677c3ec9032ea01090f74602d839d1c571d012..a469a5e2dec4b05e51474f0a1af190c1ccf23c7e 100755
> --- a/scripts/archive-source.sh
> +++ b/scripts/archive-source.sh
> @@ -1,4 +1,4 @@
> -#!/bin/bash
> +#!/usr/bin/env bash
>   #
>   # Author: Fam Zheng <famz@redhat.com>
>   #
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>
Paolo Bonzini April 10, 2025, 12:18 p.m. UTC | #2
On 4/8/25 22:14, Joel Granados wrote:
> Use "#!/usr/bin/env bash" instead of "#!/bin/bash". This is necessary
> for nix environments as they only provide /usr/bin/env at the standard
> location.

I am confused, how does this not break everything else?  All the test 
scripts in tests/docker/test-* have "#!/bin/bash", and configure has 
"/bin/sh".  How is the environment that runs scripts/archive-source.sh 
different, and why should it be fixed in scripts/archive-source.sh?

These are genuine questions - it would help if the commit message 
explained those... In fact, what is a nix overlay and why would you use 
scripts/archive-source.sh to prepare one? :)

> 
> Signed-off-by: Joel Granados <joel.granados@kernel.org>
> ---
>   scripts/archive-source.sh | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh
> index 30677c3ec9032ea01090f74602d839d1c571d012..a469a5e2dec4b05e51474f0a1af190c1ccf23c7e 100755
> --- a/scripts/archive-source.sh
> +++ b/scripts/archive-source.sh
> @@ -1,4 +1,4 @@
> -#!/bin/bash
> +#!/usr/bin/env bash
>   #
>   # Author: Fam Zheng <famz@redhat.com>
>   #
>
diff mbox series

Patch

diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh
index 30677c3ec9032ea01090f74602d839d1c571d012..a469a5e2dec4b05e51474f0a1af190c1ccf23c7e 100755
--- a/scripts/archive-source.sh
+++ b/scripts/archive-source.sh
@@ -1,4 +1,4 @@ 
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # Author: Fam Zheng <famz@redhat.com>
 #