[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/08: utils: Add 'install-file'.
From: |
Ludovic Courtès |
Subject: |
07/08: utils: Add 'install-file'. |
Date: |
Sat, 29 Aug 2015 14:16:30 +0000 |
civodul pushed a commit to branch core-updates
in repository guix.
commit 4cc2ed98cf7837e042ad4234c91fe730259a7170
Author: Ludovic Courtès <address@hidden>
Date: Fri Aug 28 22:07:05 2015 +0200
utils: Add 'install-file'.
* guix/build/utils.scm (install-file): New procedure.
---
guix/build/utils.scm | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index 676a012..1640693 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -43,6 +43,7 @@
ar-file?
with-directory-excursion
mkdir-p
+ install-file
copy-recursively
delete-file-recursively
file-name-predicate
@@ -197,6 +198,12 @@ with the bytes in HEADER, a bytevector."
(apply throw args))))))
(() #t))))
+(define (install-file file directory)
+ "Create DIRECTORY if it does not exist and copy FILE in there under the same
+name."
+ (mkdir-p directory)
+ (copy-file file (string-append directory "/" (basename file))))
+
(define* (copy-recursively source destination
#:key
(log (current-output-port))
- branch core-updates created (now 96c4621), Ludovic Courtès, 2015/08/29
- 01/08: gnu: Add 'bash-static'., Ludovic Courtès, 2015/08/29
- 02/08: gnu: binutils: Upgrade to 2.25.1., Ludovic Courtès, 2015/08/29
- 03/08: gnu: ncurses: Upgrade to 6.0., Ludovic Courtès, 2015/08/29
- 05/08: gnu: ncurses: Remove obsolete hack., Ludovic Courtès, 2015/08/29
- 04/08: gnu: ncurses: Rework trick to avoid reference to the bootstrap bash., Ludovic Courtès, 2015/08/29
- 07/08: utils: Add 'install-file'.,
Ludovic Courtès <=
- 06/08: gnu: glibc: Do not copy static Bash binary to bin/., Ludovic Courtès, 2015/08/29
- 08/08: gnu: Use 'install-file' instead of 'mkdir-p' and 'copy-file' in obvious cases., Ludovic Courtès, 2015/08/29