Correctly show description and update time for all
Not just to top-level projects anymore.
This commit is contained in:
parent
619d4678ba
commit
8d15d4e7f9
1 changed files with 9 additions and 12 deletions
|
@ -25,12 +25,9 @@
|
||||||
(lambda (name stat)
|
(lambda (name stat)
|
||||||
(not (file-exists? (string-append name "/config")))))))
|
(not (file-exists? (string-append name "/config")))))))
|
||||||
|
|
||||||
(define (project-dir project)
|
|
||||||
(string-append *projects-dir* "/" project))
|
|
||||||
|
|
||||||
(define (project-description project)
|
(define (project-description project)
|
||||||
(let ((dfile-name
|
(let ((dfile-name
|
||||||
(string-append (project-dir project) "/description")))
|
(string-append project "/description")))
|
||||||
(if (file-exists? dfile-name)
|
(if (file-exists? dfile-name)
|
||||||
(with-input-from-file dfile-name
|
(with-input-from-file dfile-name
|
||||||
(lambda ()
|
(lambda ()
|
||||||
|
@ -39,10 +36,9 @@
|
||||||
|
|
||||||
(define (git-last-update project)
|
(define (git-last-update project)
|
||||||
"Check when the last update upstream was."
|
"Check when the last update upstream was."
|
||||||
(let* ((dfile-name (project-dir project))
|
(let* ((pipe (open-input-pipe
|
||||||
(pipe (open-input-pipe
|
|
||||||
(string-append
|
(string-append
|
||||||
"git --git-dir=" dfile-name
|
"git --git-dir=" project
|
||||||
" log -1 --format=%ar 2>/dev/null")))
|
" log -1 --format=%ar 2>/dev/null")))
|
||||||
(relative-last-update (read-line pipe)))
|
(relative-last-update (read-line pipe)))
|
||||||
(close-pipe pipe)
|
(close-pipe pipe)
|
||||||
|
@ -57,11 +53,12 @@
|
||||||
name)))
|
name)))
|
||||||
|
|
||||||
(define (project->row dir project)
|
(define (project->row dir project)
|
||||||
|
(let ((project-dir (string-append dir "/" project)))
|
||||||
`(tr
|
`(tr
|
||||||
(td ,(gitless project))
|
(td ,(gitless project))
|
||||||
(td ,(project-description project))
|
(td ,(project-description project-dir))
|
||||||
(td ,(git-last-update project))
|
(td ,(git-last-update project-dir))
|
||||||
(td "")))
|
(td ""))))
|
||||||
|
|
||||||
(define (project-list->table top-dir list lvl)
|
(define (project-list->table top-dir list lvl)
|
||||||
(let ((head (car list))
|
(let ((head (car list))
|
||||||
|
|
Loading…
Reference in a new issue