def findfile (sfilename, dir):
import shutil
import fnmatch
import os
matches = []
for root, dirnames, filenames in os.walk(dir):
for filename in fnmatch.filter(filenames, sfilename):
matches.append(os.path.join(root, filename))
return matches
addtask do_signing after do_deploy
python do_signing() {
matches = []
signfiles = []
deploydir = d.getVar('DEPLOY_DIR_IMAGE', True)
signfiles = d.getVar('SRC_SIGNING', True)
if not signfiles:
return
bb.warn ("do_signing ", deploydir)
for item in d.getVar('SRC_SIGNING', True).split():
matches = findfile(item,deploydir)
if not matches:
bb.warn ("file not found", item)
elif len(matches) == 1:
bb.warn ("item found ", item)
"""
Add the line of code to sign the file
"""
else:
bb.warn ("more than one occurence found") }