GNU bug report logs - #34279
guix-install.sh: uses /bin/bash shebang

Previous Next

Package: guix;

Reported by: Claes Wallin (韋嘉誠) <clacke <at> lysator.liu.se>

Date: Fri, 1 Feb 2019 16:12:02 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 34279 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Claes Wallin <clacke <at> lysator.liu.se>, 34279 <at> debbugs.gnu.org
Subject: Re: bug#34279: guix-install.sh: uses /bin/bash shebang
Date: Mon, 04 Feb 2019 22:56:01 +0100
Ludovic Courtès <ludo <at> gnu.org> writes:

> Hi,
>
> Claes Wallin (韋嘉誠) <clacke <at> lysator.liu.se> skribis:
>
>> This means ./guix-install.sh doesn't work on e.g. NixOS. :-)
>>
>> Please use /usr/bin/env bash.
>
> /usr/bin/env wouldn’t work on Guix System by default.  :-)

“guix-install.sh” arguably would not primarily be executed on a Guix
system.

> +# 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
> +

Neat!

--
Ricardo





This bug report was last modified 6 years and 108 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.