[OE-core] [PATCH v2] devtool: deploy-target: Don't use find -exec
Daniel Lublin
daniel at lublin.se
Wed May 31 06:02:20 UTC 2017
find may be provided by busybox, which might be compiled without support
for -exec.
Signed-off-by: Daniel Lublin <daniel at lublin.se>
---
scripts/lib/devtool/deploy.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/scripts/lib/devtool/deploy.py b/scripts/lib/devtool/deploy.py
index b3730ae833..d181135a9d 100644
--- a/scripts/lib/devtool/deploy.py
+++ b/scripts/lib/devtool/deploy.py
@@ -119,7 +119,11 @@ def _prepare_remote_script(deploy, verbose=False, dryrun=False, undeployall=Fals
# Put any preserved files back
lines.append('if [ -d $preservedir ] ; then')
lines.append(' cd $preservedir')
- lines.append(' find . -type f -exec mv {} /{} \;')
+ # find from busybox might not have -exec, so we don't use that
+ lines.append(' find . -type f | while read file')
+ lines.append(' do')
+ lines.append(' mv $file /$file')
+ lines.append(' done')
lines.append(' cd /')
lines.append(' rm -rf $preservedir')
lines.append('fi')
--
2.13.0
More information about the Openembedded-core
mailing list