guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

12/12: installer: Tell the user where the config file is.


From: guix-commits
Subject: 12/12: installer: Tell the user where the config file is.
Date: Sun, 28 Apr 2019 16:57:18 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit d779de18175fe99f4ed490bc8af2e80571389144
Author: Ludovic Court├Ęs <address@hidden>
Date:   Sun Apr 28 22:55:01 2019 +0200

    installer: Tell the user where the config file is.
    
    * gnu/installer/newt/final.scm (strip-prefix): New procedure.
    (run-config-display-page): Add a sentence showing where the config file
    is stored.
---
 gnu/installer/newt/final.scm | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/gnu/installer/newt/final.scm b/gnu/installer/newt/final.scm
index e8d3c48..e375282 100644
--- a/gnu/installer/newt/final.scm
+++ b/gnu/installer/newt/final.scm
@@ -30,15 +30,24 @@
   #:use-module (newt)
   #:export (run-final-page))
 
+(define* (strip-prefix file #:optional (prefix (%installer-target-dir)))
+  "Strip PREFIX from FILE, if PREFIX actually is a prefix of FILE."
+  (if (string-prefix? prefix file)
+      (string-drop file (string-length prefix))
+      file))
+
 (define (run-config-display-page)
   (let ((width (%configuration-file-width))
         (height (nearest-exact-integer
                  (/ (screen-rows) 2))))
     (run-file-textbox-page
-     #:info-text (G_ "We're now ready to proceed with the installation! \
+     #:info-text (format #f (G_ "\
+We're now ready to proceed with the installation! \
 A system configuration file has been generated, it is displayed below.  \
+This file will be available as '~a' on the installed system.  \
 The new system will be created from this file once you've pressed OK.  \
 This will take a few minutes.")
+                         (strip-prefix (%installer-configuration-file)))
      #:title (G_ "Configuration file")
      #:file (%installer-configuration-file)
      #:info-textbox-width width



reply via email to

[Prev in Thread] Current Thread [Next in Thread]