[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] chicken-install: how to retrieve with dependencies
From: |
Vok Vojwo |
Subject: |
Re: [Chicken-users] chicken-install: how to retrieve with dependencies |
Date: |
Fri, 25 Nov 2011 13:08:09 +0100 |
2011/11/25 Mario Domenech Goulart <address@hidden>:
>
> It's far from being a definitive solution, but you can find a quick hack
> here: http://parenteses.org/mario/misc/fetch-eggs.scm
>
> Just call it like:
>
> $ csi -s fetch-eggs.scm egg1 egg2 ...
>
Thanks! I did already something similar:
(define (main args)
(let ((egg (car args)))
(system (string-append "chicken-install -r " egg))
(letrec ((meta (string-append egg "/" egg ".meta"))
(deps (assoc 'depends (read (open-input-file meta)))))
(if deps
(let ((eggs (map (lambda (egg) (if (pair? egg) (car egg) egg))
(cdr deps))))
(for-each
(lambda (egg)
(main (list egg)))
(map symbol->string eggs)))))))
But it would be nice if chicken-install can do this out of the box.
It would also be nice if the functionality of chicken-install is part
of some module to avoid the "system" calls.