diff --git a/gitto/git.scm b/gitto/git.scm index a0cec3a..c7b2cdf 100644 --- a/gitto/git.scm +++ b/gitto/git.scm @@ -37,7 +37,8 @@ repo-location repo-name repository? - repository)) -(define (repository)) (force (slot-ref branch 'pullable))) diff --git a/gitto/main.scm b/gitto/main.scm index f8eeb18..f4efeae 100644 --- a/gitto/main.scm +++ b/gitto/main.scm @@ -43,7 +43,8 @@ (define (list-repository-locations) "List the registered locations of repositories." - (for-each print-repository-location (sort repositories repository. (define-module (gitto path) - #:export (realpath)) + #:export (realpath + ensure-directory-exists.)) (load-extension "libguile-gitto-path" "init_gitto") + +(define (ensure-directory-exists. path) + "Make sure PATH exists. + +Check if PATH exists, and if so do nothing. If PATH doesn't exist, +create it." + (unless (file-exists? path) + (mkdir path)))