emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#34279: closed (guix-install.sh: uses /bin/bash she


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#34279: closed (guix-install.sh: uses /bin/bash shebang)
Date: Tue, 05 Feb 2019 11:05:02 +0000

Your message dated Tue, 05 Feb 2019 12:04:44 +0100
with message-id <address@hidden>
and subject line Re: bug#34279: guix-install.sh: uses /bin/bash shebang
has caused the debbugs.gnu.org bug report #34279,
regarding guix-install.sh: uses /bin/bash shebang
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
34279: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=34279
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: guix-install.sh: uses /bin/bash shebang Date: Fri, 1 Feb 2019 16:35:56 +0100
This means ./guix-install.sh doesn't work on e.g. NixOS. :-)

Please use /usr/bin/env bash.

The manual workaround is obvious, but this is a thousand-papercuts bug.



--- End Message ---
--- Begin Message --- Subject: Re: bug#34279: guix-install.sh: uses /bin/bash shebang Date: Tue, 05 Feb 2019 12:04:44 +0100 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
Ludovic Courtès <address@hidden> skribis:

> What about something like this:
>
> diff --git a/etc/guix-install.sh b/etc/guix-install.sh
> index 8eb5214049..dc8de2fe92 100755
> --- a/etc/guix-install.sh
> +++ b/etc/guix-install.sh
> @@ -1,4 +1,4 @@
> -#!/bin/bash
> +#!/bin/sh
>  # GNU Guix --- Functional package management for GNU
>  # Copyright © 2017 sharlatan <address@hidden>
>  # Copyright © 2018 Ricardo Wurmus <address@hidden>
> @@ -19,6 +19,13 @@
>  # You should have received a copy of the GNU General Public License
>  # along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
>  
> +# We require Bash but for portability we'd rather not use /bin/bash or
> +# /usr/bin/env in the shebang, hence this hack.
> +if [ "x$BASH_VERSION" = "x" ]
> +then
> +    exec bash "$0" "$@"
> +fi

Pushed as f5fdc54d3a0845d0590c181d3bd6016f22765431.

Ludo’.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]