[oe-commits] [openembedded-core] 04/38: devtool: deploy-target: Don't use find -exec

git at git.openembedded.org git at git.openembedded.org
Sat Jun 3 22:46:56 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master
in repository openembedded-core.

commit 404e8e3661469175e1ea087ebfaf3a7867bf4df2
Author: Daniel Lublin <daniel at lublin.se>
AuthorDate: Wed May 31 08:02:20 2017 +0200

    devtool: deploy-target: Don't use find -exec
    
    find may be provided by busybox, which might be compiled without support
    for -exec.
    
    Signed-off-by: Daniel Lublin <daniel at lublin.se>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 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 b3730ae..d181135 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')

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list