[PATCH 1/1] genenv: fix files copy

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Tue Sep 11 00:58:05 EDT 2012


we may specify file in the defconfig

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
 scripts/genenv |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/scripts/genenv b/scripts/genenv
index c84af0c..ff7972b 100755
--- a/scripts/genenv
+++ b/scripts/genenv
@@ -11,7 +11,11 @@ shift 2
 tempdir=$(mktemp -d tmp.XXXXXX)
 
 for i in $*; do
-	cp -r $i/* $tempdir
+	if [ -d $i ]; then
+		cp -r $i/* $tempdir
+	else
+		cp -a $i $tempdir
+	fi
 done
 
 find $tempdir -name '.svn' -o -name '*~' | xargs --no-run-if-empty rm -r
-- 
1.7.10.4




More information about the barebox mailing list