[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/155: installer: Use ice-9 match.
From: |
John Darrington |
Subject: |
07/155: installer: Use ice-9 match. |
Date: |
Wed, 21 Dec 2016 20:48:29 +0000 (UTC) |
jmd pushed a commit to branch wip-installer
in repository guix.
commit e084f1fc62072960c93c06506ee1ae1cced59490
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 56a7072), John Darrington, 2016/12/21
- 02/155: installer: Fix broken keymap change option., John Darrington, 2016/12/21
- 03/155: installer: Remove obsolete procedures/variables, John Darrington, 2016/12/21
- 04/155: installer: Fix broken timezone menu., John Darrington, 2016/12/21
- 05/155: installer: fix warning in usage of "format"., John Darrington, 2016/12/21
- 08/155: installer: Add IETF contraints for hostname in entry form., John Darrington, 2016/12/21
- 07/155: installer: Use ice-9 match.,
John Darrington <=
- 06/155: installer: use ice-9 format everywhere., John Darrington, 2016/12/21
- 19/155: refresh: Make dependency on (guix import crates) weak., John Darrington, 2016/12/21
- 16/155: gnu: grub: Add dependency on efibootmgr., John Darrington, 2016/12/21
- 20/155: download: Protect against dangling symlinks in $SSL_CERT_DIR., John Darrington, 2016/12/21
- 11/155: installer: Change "interfaces" from a variable to a procedure., John Darrington, 2016/12/21
- 21/155: profiles: Build profiles in a UTF-8 locale., John Darrington, 2016/12/21
- 09/155: installer: Use a record instead of a list to contain tasks., John Darrington, 2016/12/21
- 13/155: installer: Use call-with-temporary-output-file., John Darrington, 2016/12/21
- 29/155: gnu: Add fatfsck-static., John Darrington, 2016/12/21
- 24/155: build: assert-no-store-file-names: Ignore ChangeLog., John Darrington, 2016/12/21