From: ludo@gnu.org (Ludovic Courtès)
To: Arun Isaac <arunisaac@systemreboot.net>
Cc: 28281@debbugs.gnu.org
Subject: [bug#28281] [PATCH] gnu: Add os-prober.
Date: Sun, 10 Sep 2017 22:41:37 +0200 [thread overview]
Message-ID: <87k2165lry.fsf@gnu.org> (raw)
In-Reply-To: <403302d1.ADkAAC_e-_IAAAAAAAAAAAOzWv8AAAACwQwAAAAAAAW9WABZtWIT@mailjet.com> (Arun Isaac's message of "Sun, 10 Sep 2017 21:32:19 +0530")
Arun Isaac <arunisaac@systemreboot.net> skribis:
>>>> + (replace 'install
>>>> + (lambda* (#:key outputs #:allow-other-keys)
>>>> + (define (find-files-non-recursive directory)
>>>> + (find-files directory
>>>> + (lambda (file stat)
>>>> + (string-match (string-append "^" directory "/[^/]*$")
>>>> + file))
>>>> + #:directories? #t))
>>>
>>> Do you think it would be a good idea to add a #:recursive? keyword
>>> argument to `find-files' in (guix build utils), instead of creating this
>>> `find-files-non-recursive-function' here?
>>
>> Hmm I didn’t understand that it *had* to be non-recursive. Does it
>> really make a difference?
>
> I am trying to do
>
> cp -r /some/directory/* destination
>
> To do this, I used `find-files-non-recursive' to get all files in
> /some/directory/ and applied `copy-recursively' on each one of them.
>
> Do you have a better way of doing this in mind?
Would (copy-recursively "/some/directory" destination) work for you?
>> If it does, then ‘scandir’ from (ice-9 ftw) would be the thing. Sorry
>> if I led you in the wrong direction. :-/
>
> Yes, scandir could be used. But, it also returns "." and "..", and I'll
> have to filter them out. So code length, or clarity-wise, it won't be
> much of an improvement. That is why I thought adding a #:recursive?
> argument to `find-files' would be nice.
Yeah, looks like none of the options is a perfect match.
HTH,
LUdo’.
next prev parent reply other threads:[~2017-09-10 20:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20170909171635.7968-1-arunisaac@systemreboot.net>
2017-09-09 17:24 ` [bug#28281] [PATCH] gnu: Add os-prober Arun Isaac
[not found] ` <e7d9c9ca.AEQAP00oGCwAAAAAAAAAAAOzWv8AAAACwQwAAAAAAAW9WABZtCPY@mailjet.com>
2017-09-10 13:05 ` Ludovic Courtès
2017-09-10 16:02 ` Arun Isaac
[not found] ` <403302d1.ADkAAC_e-_IAAAAAAAAAAAOzWv8AAAACwQwAAAAAAAW9WABZtWIT@mailjet.com>
2017-09-10 20:41 ` Ludovic Courtès [this message]
2017-09-10 23:35 ` Arun Isaac
[not found] ` <5dc91a20.AEAAPzHdNuYAAAAAAAAAAAOzWv8AAAACwQwAAAAAAAW9WABZtcxv@mailjet.com>
2017-09-11 7:28 ` Ludovic Courtès
2017-09-11 17:23 ` Arun Isaac
[not found] ` <207deec4.AEAAP2Xyu24AAAAAAAAAAAOzWv8AAAACwQwAAAAAAAW9WABZtsaB@mailjet.com>
2017-09-11 20:20 ` Ludovic Courtès
2017-09-13 23:22 ` bug#28281: " Arun Isaac
2017-08-29 19:06 [bug#28281] " Arun Isaac
2017-08-31 13:25 ` Ludovic Courtès
2017-08-31 17:41 ` Arun Isaac
2017-09-09 17:16 ` Arun Isaac
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k2165lry.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=28281@debbugs.gnu.org \
--cc=arunisaac@systemreboot.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).