summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorGravatar Tom Willemsen2012-09-11 22:28:49 +0200
committerGravatar Tom Willemsen2012-09-11 22:28:49 +0200
commit8d15d4e7f9fe83f5de21f15c6848f0748b644bd2 (patch)
tree8e789ce89a70c8177286ced130da655cb51ff0d0
parent619d4678ba94530207009f8199a3a82a4f68d104 (diff)
downloadtekuti-8d15d4e7f9fe83f5de21f15c6848f0748b644bd2.tar.gz
tekuti-8d15d4e7f9fe83f5de21f15c6848f0748b644bd2.zip
Correctly show description and update time for all
Not just to top-level projects anymore.
-rw-r--r--tekuti/projects.scm21
1 files changed, 9 insertions, 12 deletions
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))