Subject: [PATCH 2/5] guix-install.sh: Add parse_args.

From: rsiddharth <[email-masked]>
Date: Fri, 2 Nov 2018 21:10:48 -0400

* 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 cf839c20e..d16f8ac59 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.
+    export AUTO_YN=${1:1:1}
+    if [ -z $AUTO_YN ]; then
+        export AUTO_YN=""
+    fi
+}
+
 welcome()
 {
     cat<<"EOF"
-- 
2.19.1