* [PATCH] scripts: genenv: remove empty files from tempdir
@ 2013-05-28 7:45 Jan Luebbe
2013-05-28 8:11 ` Uwe Kleine-König
2013-05-28 10:55 ` [SPAM] " Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 2 replies; 4+ messages in thread
From: Jan Luebbe @ 2013-05-28 7:45 UTC (permalink / raw)
To: barebox
This allows leaving out default files from the environment by overriding
them with empty files in the board or BSP.
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
---
scripts/genenv | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/genenv b/scripts/genenv
index 374db6d..3e91062 100755
--- a/scripts/genenv
+++ b/scripts/genenv
@@ -24,7 +24,7 @@ for i in $*; do
done
)
-find $tempdir -name '.svn' -o -name '*~' | xargs --no-run-if-empty rm -r
+find $tempdir -name '.svn' -o -name '*~' -o -size 0 | xargs --no-run-if-empty rm -r
$objtree/scripts/bareboxenv -s $tempdir $target
--
1.8.2.rc2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scripts: genenv: remove empty files from tempdir
2013-05-28 7:45 [PATCH] scripts: genenv: remove empty files from tempdir Jan Luebbe
@ 2013-05-28 8:11 ` Uwe Kleine-König
2013-05-28 10:55 ` [SPAM] " Jean-Christophe PLAGNIOL-VILLARD
1 sibling, 0 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2013-05-28 8:11 UTC (permalink / raw)
To: Jan Luebbe; +Cc: barebox
Hello,
On Tue, May 28, 2013 at 09:45:46AM +0200, Jan Luebbe wrote:
> This allows leaving out default files from the environment by overriding
> them with empty files in the board or BSP.
>
> Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
> ---
> scripts/genenv | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/genenv b/scripts/genenv
> index 374db6d..3e91062 100755
> --- a/scripts/genenv
> +++ b/scripts/genenv
> @@ -24,7 +24,7 @@ for i in $*; do
> done
> )
>
> -find $tempdir -name '.svn' -o -name '*~' | xargs --no-run-if-empty rm -r
> +find $tempdir -name '.svn' -o -name '*~' -o -size 0 | xargs --no-run-if-empty rm -r
Maybe use -empty instead of -size 0?
Other than that this is broken for funny filenames.
find "$tempdir" -name '.svn' -o -name '*~' -o -size 0 -print0 | xargs --no-run-if-empty --null rm -r
would work, but depends on GNU find and xargs. I don't know if that is a
problem. Alternatively use:
find "$tempdir" -depth -name '.svn' -o -name '*~' -o -size 0 -execdir rm -r {} +
(Obviously this doesn't make your patch worse, I'm just pointing out
another possible improvement.) And note my suggestions are untested.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [SPAM] [PATCH] scripts: genenv: remove empty files from tempdir
2013-05-28 7:45 [PATCH] scripts: genenv: remove empty files from tempdir Jan Luebbe
2013-05-28 8:11 ` Uwe Kleine-König
@ 2013-05-28 10:55 ` Jean-Christophe PLAGNIOL-VILLARD
2013-05-28 16:34 ` Jan Lübbe
1 sibling, 1 reply; 4+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-05-28 10:55 UTC (permalink / raw)
To: Jan Luebbe; +Cc: barebox
On 09:45 Tue 28 May , Jan Luebbe wrote:
> This allows leaving out default files from the environment by overriding
> them with empty files in the board or BSP.
>
> Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
> ---
can we move it to the buildir and keep it
and no need to have a uniq name everytime
> scripts/genenv | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/genenv b/scripts/genenv
> index 374db6d..3e91062 100755
> --- a/scripts/genenv
> +++ b/scripts/genenv
> @@ -24,7 +24,7 @@ for i in $*; do
> done
> )
>
> -find $tempdir -name '.svn' -o -name '*~' | xargs --no-run-if-empty rm -r
> +find $tempdir -name '.svn' -o -name '*~' -o -size 0 | xargs --no-run-if-empty rm -r
>
> $objtree/scripts/bareboxenv -s $tempdir $target
>
> --
> 1.8.2.rc2
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [SPAM] [PATCH] scripts: genenv: remove empty files from tempdir
2013-05-28 10:55 ` [SPAM] " Jean-Christophe PLAGNIOL-VILLARD
@ 2013-05-28 16:34 ` Jan Lübbe
0 siblings, 0 replies; 4+ messages in thread
From: Jan Lübbe @ 2013-05-28 16:34 UTC (permalink / raw)
To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox
On Tue, 2013-05-28 at 12:55 +0200, Jean-Christophe PLAGNIOL-VILLARD
wrote:
> On 09:45 Tue 28 May , Jan Luebbe wrote:
> > This allows leaving out default files from the environment by overriding
> > them with empty files in the board or BSP.
> >
> > Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
> > ---
> can we move it to the buildir and keep it
>
> and no need to have a uniq name everytime
Sorry, could you explain this again differently? I don't understand your
comment.
Regards,
Jan
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-05-28 16:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-28 7:45 [PATCH] scripts: genenv: remove empty files from tempdir Jan Luebbe
2013-05-28 8:11 ` Uwe Kleine-König
2013-05-28 10:55 ` [SPAM] " Jean-Christophe PLAGNIOL-VILLARD
2013-05-28 16:34 ` Jan Lübbe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox