add sysupdate script

This commit is contained in:
LordMZTE 2023-11-12 18:45:37 +01:00
parent d8cadc62dc
commit f5cfaa1216
Signed by: LordMZTE
GPG key ID: B64802DC33A64FF6
2 changed files with 25 additions and 0 deletions

24
scripts/sysupdate.rkt Executable file
View file

@ -0,0 +1,24 @@
#!/usr/bin/env racket
#lang racket
(current-print void)
(define noint (make-parameter #f))
(command-line #:program "sysupdate"
#:usage-help "Update the system"
#:once-each [("-n" "--noint") "Don't require user interaction" (noint #t)])
(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)]))
(apply cmd (if (noint)
'("paru" "-Syu" "--noconfirm")
'("paru" "-Syu")))
(cmd "zupper" "update")
(cmd "rustup" "update")
(cmd "update-nvim-plugins")
(cmd "tldr" "--update")

View file

@ -11,6 +11,7 @@
;; Symlink interpreted scripts
(install-link "scripts/map-touch-display.rkt" (bin-path "map-touch-display"))
(install-link "scripts/startriver.sh" (bin-path "startriver"))
(install-link "scripts/sysupdate.rkt" (bin-path "sysupdate"))
(install-link "scripts/update-nvim-plugins.rkt" (bin-path "update-nvim-plugins"))
(install-link "scripts/use-country-mirrors.sh" (bin-path "use-country-mirrors"))
(install-link "scripts/videos-duration.sh" (bin-path "videos-duration"))