ambrevar/storage: Add absolute-path.

master
Pierre Neidhardt 2021-06-05 15:59:52 +02:00
parent 3fa99afa57
commit 7db651b2b7
1 changed files with 7 additions and 0 deletions

View File

@ -20,6 +20,12 @@
(first (json:decode-json-from-string
(cmd:$cmd "findmnt -n --fstab --output TARGET --json")))))))
(defun absolute-path (path-designator)
(uiop:native-namestring
(uiop:truename* (if (pathnamep path-designator)
path-designator
(uiop:parse-native-namestring path-designator)))))
(defun subpath (root &rest subdirs)
"Return merged paths as a string.
SUBDIRS can be either a single path or a list of paths."
@ -207,6 +213,7 @@ If DESTINATION ends with '.gpg', it gets GPG-encrypted."
("Staged files"
,(sera:lines (legit:git-value repository '(staged) (legit:git-diff :name-only t :cached t)))))))
;; TODO: Add option to push upstream?
(export-always 'project-statuses)
(defun project-statuses ()
(delete-if (sera:op (and (null (second (second _1)))