From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42205) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1et9v3-0005wl-EG for guix-patches@gnu.org; Tue, 06 Mar 2018 05:34:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1et9v0-0007Ss-DI for guix-patches@gnu.org; Tue, 06 Mar 2018 05:34:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:38965) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1et9v0-0007Sk-9R for guix-patches@gnu.org; Tue, 06 Mar 2018 05:34:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1et9v0-0000iZ-1F for guix-patches@gnu.org; Tue, 06 Mar 2018 05:34:02 -0500 Subject: bug#30708: [PATCH] utils: Add helper method to list subdirectories. Resent-To: guix-patches@gnu.org Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <87a7vnma48.fsf@gmail.com> <87lgf68n07.fsf@gnu.org> <87y3j6kkuz.fsf@gmail.com> Date: Tue, 06 Mar 2018 11:33:44 +0100 In-Reply-To: <87y3j6kkuz.fsf@gmail.com> (Maxim Cournoyer's message of "Mon, 05 Mar 2018 21:18:12 -0500") Message-ID: <87lgf5xzlj.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Maxim Cournoyer Cc: 30708-done@debbugs.gnu.org Hi Maxim, Maxim Cournoyer 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 followi= ng > ;; 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=E2=80=99m glad that it works for you. :-) Thanks, Ludo=E2=80=99.