[elbe-devel] [PATCH] Fix cp and mv command in finetuning
Philipp Arras
philipp.arras at linutronix.de
Tue Jun 13 11:15:27 CEST 2017
Now finetuning commands like
`<cp path="/usr/lib/u-boot/u*">/boot</cp>`
are supported. Previously, elbe did not understand placeholders like `*`.
---
elbepack/finetuning.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/elbepack/finetuning.py b/elbepack/finetuning.py
index de19f7e..03946d0 100644
--- a/elbepack/finetuning.py
+++ b/elbepack/finetuning.py
@@ -114,7 +114,9 @@ class CpAction(FinetuningAction):
FinetuningAction.__init__(self, node)
def execute(self, log, buildenv, target):
- log.do( "cp -av " + target.fname( self.node.et.attrib['path'] ) + " " + target.fname( self.node.et.text ) )
+ src = target.glob(self.node.et.attrib['path'])
+ for f in src:
+ log.do("cp -av " + f + " " + target.fname(self.node.et.text))
FinetuningAction.register( CpAction )
@@ -179,7 +181,9 @@ class MvAction(FinetuningAction):
FinetuningAction.__init__(self, node)
def execute(self, log, buildenv, target):
- log.do( "mv -v " + target.fname( self.node.et.attrib['path'] ) + " " + target.fname( self.node.et.text ) )
+ src = target.glob(self.node.et.attrib['path'])
+ for f in src:
+ log.do("mv -v " + f + " " + target.fname(self.node.et.text))
FinetuningAction.register( MvAction )
--
2.1.4
More information about the elbe-devel
mailing list