guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#30708: [PATCH] utils: Add helper method to list subdirectories.


From: Ludovic Courtès
Subject: bug#30708: [PATCH] utils: Add helper method to list subdirectories.
Date: Tue, 06 Mar 2018 11:33:44 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Hi Maxim,

Maxim Cournoyer <address@hidden> skribis:

> Although now that you've made me see the light (scandir), I could
> rewrite the whole thing using:
>
>           (lambda _
>              ;; The build system doesn't allow us to unbundle the following
>              ;; libraries.
>              (let ((keep-dirs '("nova-simd" "nova-tt" "hidapi" "TLSF-2.4.6"
>                                 "oscpack_1_1_0" "." "..")))
>                (with-directory-excursion "./external_libraries"
>                  (for-each
>                   delete-file-recursively
>                   (scandir "."
>                            (lambda (x)
>                              (and (eq? (stat:type (stat x)) 'directory)
>                                   (not (member (basename x) keep-dirs))))))))
>
> So, this patch can go to the recycle bin. Thanks! :)

Well, I’m glad that it works for you.  :-)

Thanks,
Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]