[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/21: installer: Use ice-9 match.
From: |
John Darrington |
Subject: |
07/21: installer: Use ice-9 match. |
Date: |
Thu, 22 Dec 2016 19:58:40 +0000 (UTC) |
jmd pushed a commit to branch wip-installer
in repository guix.
commit 0afe28a3ebf01822a0a4d227a374f5269d2d89c6
Author: John Darrington <address@hidden>
Date: Sun Dec 18 08:14:14 2016 +0100
installer: Use ice-9 match.
* gnu/system/installer/network.scm (interfaces): Use match instead of cadr.
---
gnu/system/installer/network.scm | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/gnu/system/installer/network.scm b/gnu/system/installer/network.scm
index ada4f28..1aa193b 100644
--- a/gnu/system/installer/network.scm
+++ b/gnu/system/installer/network.scm
@@ -37,11 +37,13 @@
(define interfaces (delete "lo"
- (slurp "ip -o link"
- (lambda (s)
- (string-trim-both
- (cadr (string-split s #\:))
- char-set:whitespace)))))
+ (slurp "ip -o link"
+ (lambda (s)
+ (match (string-split s #\:)
+ ((_ interface-name . _)
+ (string-trim-both
+ interface-name
+ char-set:whitespace)))))))
(define my-buttons `((continue ,(N_ "_Continue") #t)
(test ,(N_ "_Test") #t)))
- branch wip-installer created (now 704f546), John Darrington, 2016/12/22
- 05/21: installer: fix warning in usage of "format"., John Darrington, 2016/12/22
- 02/21: installer: Fix broken keymap change option., John Darrington, 2016/12/22
- 06/21: installer: use ice-9 format everywhere., John Darrington, 2016/12/22
- 03/21: installer: Remove obsolete procedures/variables, John Darrington, 2016/12/22
- 07/21: installer: Use ice-9 match.,
John Darrington <=
- 20/21: installer: Remove unused procedure., John Darrington, 2016/12/22
- 14/21: installer: Add alternate method of finding TZDIR., John Darrington, 2016/12/22
- 21/21: gnu: guix: Add dependency: guile-ncurses., John Darrington, 2016/12/22
- 17/21: installer: Add new procedure to get the list of volumes., John Darrington, 2016/12/22
- 18/21: installer: Add completion predicate for disk task., John Darrington, 2016/12/22
- 04/21: installer: Fix broken timezone menu., John Darrington, 2016/12/22
- 11/21: installer: Change "interfaces" from a variable to a procedure., John Darrington, 2016/12/22
- 13/21: installer: Use call-with-temporary-output-file., John Darrington, 2016/12/22
- 08/21: installer: Add IETF contraints for hostname in entry form., John Darrington, 2016/12/22
- 19/21: installer: Handle the 'back' action in the filesystems task., John Darrington, 2016/12/22