add update-nvim-plugins script
This commit is contained in:
parent
497bb42565
commit
cb431ee1a0
2
justfile
2
justfile
|
@ -15,7 +15,7 @@ zls-git
|
|||
|
||||
install-scripts target=(`echo $HOME` + "/.local"):
|
||||
ln -sf \
|
||||
`pwd`/scripts/{map-touch-display,start-joshuto,withjava,startriver} \
|
||||
`pwd`/scripts/{map-touch-display,start-joshuto,withjava,startriver,update-nvim-plugins} \
|
||||
{{target}}/bin
|
||||
|
||||
cd scripts/randomwallpaper && zig build -Doptimize=ReleaseFast -p {{target}}
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env racket
|
||||
#lang racket
|
||||
|
||||
;; Updates the neovim plugins
|
||||
;; Packer is currently too dumb to do this is the plugins have been compiled
|
||||
|
||||
(define plugin-dir (expand-user-path "~/.local/share/nvim/site/pack/packer"))
|
||||
|
||||
(define dirs
|
||||
(map (λ (path) (match-let-values ([(p _ _) (split-path path)]) p))
|
||||
(find-files (λ (path) (equal? (path->string (last (explode-path path))) ".git")) plugin-dir)))
|
||||
|
||||
(define git-path (find-executable-path "git"))
|
||||
|
||||
(for ([dir (in-list dirs)])
|
||||
(let ([name (last (explode-path dir))]) (printf "\n====== ~a ======\n\n" name))
|
||||
(parameterize ([current-directory dir])
|
||||
(system* git-path "checkout" "." #:set-pwd? #t)
|
||||
(system* git-path "pull" #:set-pwd? #t)))
|
Loading…
Reference in New Issue