From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42294) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gKyCI-0007yD-KH for guix-patches@gnu.org; Thu, 08 Nov 2018 23:15:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gKyCE-0006sy-JH for guix-patches@gnu.org; Thu, 08 Nov 2018 23:15:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:37858) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gKyCE-0006sV-BG for guix-patches@gnu.org; Thu, 08 Nov 2018 23:15:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gKyCE-0001kV-1a for guix-patches@gnu.org; Thu, 08 Nov 2018 23:15:02 -0500 Subject: [bug#33134] [PATCH 1/4] guix-install.sh: Add parse_args. Resent-Message-ID: From: rsiddharth Date: Thu, 8 Nov 2018 23:14:37 -0500 Message-Id: <20181109041437.45557-1-s@ricketyspace.net> In-Reply-To: <20181109041301.39042-1-s@ricketyspace.net> References: <20181109041301.39042-1-s@ricketyspace.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: 33134@debbugs.gnu.org Cc: rsiddharth * etc/guix-install.sh (parse_args): New function. --- etc/guix-install.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/etc/guix-install.sh b/etc/guix-install.sh index ca6874ba0..3191d1be9 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -370,6 +370,21 @@ sys_authorize_build_farms() done } +parse_args() +{ + local args_num=$# + + if [ $args_num -lt 1 ]; then + return + fi + + # process -y / -n arg. + AUTO_YN=${1:1:1} + if [ -z $AUTO_YN ]; then + AUTO_YN="" + fi +} + welcome() { cat<<"EOF" -- 2.19.1