ambrevar/storage: Return list of stowed saves in stow-saves.

master
Pierre Neidhardt 2021-06-05 13:04:49 +02:00
parent 29b3fe926e
commit 9ded15843d
1 changed files with 13 additions and 11 deletions

View File

@ -123,17 +123,19 @@ If DESTINATION ends with '.gpg', it gets GPG-encrypted."
(str:concat "--load=" (home ".emacs.d" "lisp" "init-notmuch-sync.el"))
"-f notmuch-dump-important-tags")))
(export-always 'stowed-saves)
(defun stowed-saves ()
(dolist (entry (fof:list-directory (personal "games" "stowed-saves")))
(format t "~a~&" (fof:path (fof:basename entry)))
(uiop:run-program
`("stow"
"-t" ,(home)
"-d" ,(fof:path (fof:parent entry))
,(fof:path (fof:basename entry)))
:output t
:error-output t)))
(export-always 'stow-saves)
(defun stow-saves ()
(mapcar
(lambda (gamesave)
(uiop:run-program
`("stow"
"-t" ,(home)
"-d" ,(fof:path (fof:parent gamesave))
,(fof:path (fof:basename gamesave)))
:output t
:error-output t)
(fof:path (fof:basename gamesave)))
(fof:list-directory (personal "games" "stowed-saves"))))
(defun git-repository? (dir)
(find ".git" (uiop:subdirectories (if (stringp dir)