From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53904) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFJ9o-0006Dk-Tx for guix-patches@gnu.org; Wed, 24 Oct 2018 09:25:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gFJ9k-0005as-NC for guix-patches@gnu.org; Wed, 24 Oct 2018 09:25:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:34959) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gFJ9k-0005ah-GY for guix-patches@gnu.org; Wed, 24 Oct 2018 09:25:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gFJ9i-0000rW-HQ for guix-patches@gnu.org; Wed, 24 Oct 2018 09:25:04 -0400 Subject: [bug#33134] [PATCH 0/1] guix-install.sh: Add ability to run it non-interactively. Resent-Message-ID: References: <20181024001542.16368-1-s@ricketyspace.net> <20181024115443.GA1297@macbook41> From: Tobias Geerinckx-Rice In-reply-to: <20181024115443.GA1297@macbook41> Date: Wed, 24 Oct 2018 15:24:03 +0200 Message-ID: <87k1m7scjw.fsf@tobias.gr> MIME-Version: 1.0 Content-Type: text/plain; format=flowed List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Efraim Flashner Cc: 33134@debbugs.gnu.org, rsiddharth rsiddharth, Efraim, Efraim Flashner wrote: > On Tue, Oct 23, 2018 at 08:15:42PM -0400, rsiddharth wrote: >> I want to be able to run the guix-install.sh >> non-interactively[1] like this: >> >> echo "yy" | guix-install.sh >> >> (One "y" for "Press return to continue..." prompt, the other >> "y" for >> "Permit downloading pre-built package binaries from the >> project's build >> farms? (yes/no)" prompt). >> >> Currently, the `read` in welcome function reads both the "y". I >> updated it to >> read just one character. >> > > would this work? echo "y\ny" | guix-install.sh Not quite, but $ echo -e "y\ny" | guix-install.sh will. Or the more conventional $ yes | guix-install.sh # untested providing guix-install.sh doesn't choke on that infinite stream of "y"s. Which it might, and even if it doesn't now, there's no guarantee that this dirty hack won't break the future. If this is something we want to support, it could be done more better through a '--non-interactive' or '--force' flag that skips these and any future prompts at the source. Non? T G-R