1
0
Fork 0

Rename and generalize gitless

Now called `remove-suffix', which removes the given suffix from the
given string.
This commit is contained in:
Tom Willemsen 2012-09-16 15:54:56 +02:00
parent f9ec43653b
commit 3b8eba0f0a

View file

@ -34,15 +34,15 @@
(read-line)))
"Unknown")))
(define (gitless name)
(let ((pos (string-contains name ".git")))
(define (remove-suffix str suffix)
(let ((pos (string-contains str suffix)))
(if pos
(substring name 0 pos)
name)))
(substring str 0 pos)
str)))
(define (project->row dir project prefix)
(let ((project-dir (string-append dir "/" project))
(project-name (gitless project)))
(project-name (remove-suffix project ".git")))
`(tr
(td (@ (class "span3"))
(a (@ (href "http://code.ryuslash.org/cgit.cgi/"