From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: bug#34279: guix-install.sh: uses /bin/bash shebang Date: Mon, 04 Feb 2019 22:56:01 +0100 Message-ID: <877eefi5fy.fsf@elephly.net> References: <87lg2vp7o4.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:53841) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqplO-00088Y-RD for bug-guix@gnu.org; Mon, 04 Feb 2019 20:43:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gqplO-0002Gy-3a for bug-guix@gnu.org; Mon, 04 Feb 2019 20:43:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60666) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gqplN-0002Gj-QA for bug-guix@gnu.org; Mon, 04 Feb 2019 20:43:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gqplN-0000Z1-Ky for bug-guix@gnu.org; Mon, 04 Feb 2019 20:43:01 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-reply-to: <87lg2vp7o4.fsf@gnu.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Claes Wallin , 34279@debbugs.gnu.org Ludovic Court=C3=A8s writes: > Hi, > > Claes Wallin (=E9=9F=8B=E5=98=89=E8=AA=A0) skribi= s: > >> This means ./guix-install.sh doesn't work on e.g. NixOS. :-) >> >> Please use /usr/bin/env bash. > > /usr/bin/env wouldn=E2=80=99t work on Guix System by default. :-) =E2=80=9Cguix-install.sh=E2=80=9D 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" =3D "x" ] > +then > + exec bash "$0" "$@" > +fi > + Neat! -- Ricardo