mirror of
https://codeberg.org/hako/Rosenthal.git
synced 2026-03-26 03:34:20 +00:00
bootloader: limine: Simplify error handling in installation script.
This commit is contained in:
parent
0168423b50
commit
af150b1f65
@ -60,8 +60,6 @@
|
|||||||
(call-with-output-file (in-vicinity limine-directory "limine.conf.tmp")
|
(call-with-output-file (in-vicinity limine-directory "limine.conf.tmp")
|
||||||
(lambda (port)
|
(lambda (port)
|
||||||
(let* ((ukify #$(file-append ukify "/bin/ukify"))
|
(let* ((ukify #$(file-append ukify "/bin/ukify"))
|
||||||
(script-path (first args))
|
|
||||||
(minbytes (* 2 (stat:size (stat script-path))))
|
|
||||||
(current-label (first '#$labels))
|
(current-label (first '#$labels))
|
||||||
(current-args (first (list #$@ukify-args)))
|
(current-args (first (list #$@ukify-args)))
|
||||||
(old-labels (cdr '#$labels))
|
(old-labels (cdr '#$labels))
|
||||||
@ -86,12 +84,10 @@
|
|||||||
(unless (null? labels)
|
(unless (null? labels)
|
||||||
(with-exception-handler
|
(with-exception-handler
|
||||||
(lambda _
|
(lambda _
|
||||||
(false-if-exception (delete-file image-name))
|
(delete-file image-name)
|
||||||
;; Exit loop.
|
;; Exit loop.
|
||||||
(loop 0 '() '()))
|
(loop 0 '() '()))
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(when (< (free-disk-space ".") minbytes)
|
|
||||||
(raise-exception 'insuffcient-disk-space))
|
|
||||||
(apply invoke/quiet
|
(apply invoke/quiet
|
||||||
ukify "build" "--output" image-name
|
ukify "build" "--output" image-name
|
||||||
(first args))
|
(first args))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user