diff --git a/tekuti/projects.scm b/tekuti/projects.scm index 1296c01..90fcb0b 100644 --- a/tekuti/projects.scm +++ b/tekuti/projects.scm @@ -25,12 +25,9 @@ (lambda (name stat) (not (file-exists? (string-append name "/config"))))))) -(define (project-dir project) - (string-append *projects-dir* "/" project)) - (define (project-description project) (let ((dfile-name - (string-append (project-dir project) "/description"))) + (string-append project "/description"))) (if (file-exists? dfile-name) (with-input-from-file dfile-name (lambda () @@ -39,10 +36,9 @@ (define (git-last-update project) "Check when the last update upstream was." - (let* ((dfile-name (project-dir project)) - (pipe (open-input-pipe + (let* ((pipe (open-input-pipe (string-append - "git --git-dir=" dfile-name + "git --git-dir=" project " log -1 --format=%ar 2>/dev/null"))) (relative-last-update (read-line pipe))) (close-pipe pipe) @@ -57,11 +53,12 @@ name))) (define (project->row dir project) - `(tr - (td ,(gitless project)) - (td ,(project-description project)) - (td ,(git-last-update project)) - (td ""))) + (let ((project-dir (string-append dir "/" project))) + `(tr + (td ,(gitless project)) + (td ,(project-description project-dir)) + (td ,(git-last-update project-dir)) + (td "")))) (define (project-list->table top-dir list lvl) (let ((head (car list))