mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-12-14 11:53:40 +01:00
add sysupdate script
This commit is contained in:
parent
d8cadc62dc
commit
f5cfaa1216
2 changed files with 25 additions and 0 deletions
24
scripts/sysupdate.rkt
Executable file
24
scripts/sysupdate.rkt
Executable 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")
|
|
@ -11,6 +11,7 @@
|
||||||
;; Symlink interpreted scripts
|
;; Symlink interpreted scripts
|
||||||
(install-link "scripts/map-touch-display.rkt" (bin-path "map-touch-display"))
|
(install-link "scripts/map-touch-display.rkt" (bin-path "map-touch-display"))
|
||||||
(install-link "scripts/startriver.sh" (bin-path "startriver"))
|
(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/update-nvim-plugins.rkt" (bin-path "update-nvim-plugins"))
|
||||||
(install-link "scripts/use-country-mirrors.sh" (bin-path "use-country-mirrors"))
|
(install-link "scripts/use-country-mirrors.sh" (bin-path "use-country-mirrors"))
|
||||||
(install-link "scripts/videos-duration.sh" (bin-path "videos-duration"))
|
(install-link "scripts/videos-duration.sh" (bin-path "videos-duration"))
|
||||||
|
|
Loading…
Reference in a new issue