Skip to content

Commit

Permalink
Improved script to dump recipe of current built.
Browse files Browse the repository at this point in the history
  • Loading branch information
f34rdotcom committed May 16, 2021
1 parent ee17a93 commit c75031b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions contrib/PiBakery/dumpRecipe.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import xml.etree.ElementTree as ET

tree = ET.parse("AlarmDecoder_WebApp_PiBakery_Recipe.xml")
root = tree.getroot()
for elt in root.iter("{http://www.w3.org/1999/xhtml}block"):

if elt.attrib.get('type') == 'runcommand':
print("run commannd as user %s: %s" % (elt[1].text.strip(), elt[0].text.strip()))
elif elt.attrib.get('type') == 'packageinstall':
print("install package %s" % (elt[0].text.strip()))

0 comments on commit c75031b

Please sign in to comment.