mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-12 09:56:14 -05:00
utils: Add 'install-file'.
* guix/build/utils.scm (install-file): New procedure.
This commit is contained in:
parent
90d891fc6c
commit
4cc2ed98cf
1 changed files with 7 additions and 0 deletions
|
@ -43,6 +43,7 @@ (define-module (guix build utils)
|
|||
ar-file?
|
||||
with-directory-excursion
|
||||
mkdir-p
|
||||
install-file
|
||||
copy-recursively
|
||||
delete-file-recursively
|
||||
file-name-predicate
|
||||
|
@ -197,6 +198,12 @@ (define not-slash
|
|||
(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))
|
||||
|
|
Loading…
Reference in a new issue