mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-05-18 15:04:19 +02:00
sysupdate script: keep track of failures
This commit is contained in:
parent
6abcccb08a
commit
ca4d26eec6
|
@ -8,12 +8,15 @@
|
|||
#:usage-help "Update the system"
|
||||
#:once-each [("-n" "--noint") "Don't require user interaction" (noint #t)])
|
||||
|
||||
(define failures '())
|
||||
|
||||
(define (cmd exe . args)
|
||||
(match (find-executable-path exe)
|
||||
[#f (printf "skipping command ~a, command not found\n" (cons exe args))]
|
||||
[exepath
|
||||
(printf ">>> ~a\n" (cons exe args))
|
||||
(apply system* exepath args)]))
|
||||
(match* ((find-executable-path exe) (cons exe args))
|
||||
[(#f argv) (printf "skipping command ~a, command not found\n" argv)]
|
||||
[(exepath argv)
|
||||
(printf ">>> ~a\n" argv)
|
||||
(unless (apply system* exepath args)
|
||||
(set! failures (cons argv failures)))]))
|
||||
|
||||
(apply cmd (if (noint)
|
||||
'("paru" "-Syu" "--noconfirm")
|
||||
|
@ -22,3 +25,6 @@
|
|||
(cmd "rustup" "update")
|
||||
(cmd "update-nvim-plugins")
|
||||
(cmd "tldr" "--update")
|
||||
|
||||
(unless (empty? failures)
|
||||
(raise-user-error "The following commands failed:" failures))
|
||||
|
|
Loading…
Reference in a new issue