1 python do_checkbashisms () {
8 return iter(open(path, "r")).next()
12 shebang = re.compile("^#! */bin/sh$")
14 srcdir = d.getVar("S", True)
15 for path in oe.path.find(srcdir):
17 if line and shebang.match(line):
19 output = oe_run(d, ["checkbashisms", path])
20 except oe.process.ExecutionError, exc:
24 except oe.process.NotFoundError, exc:
25 bb.fatal("checkbashisms not found, please install it in your PATH")
28 bb.fatal("bashisms were identified, aborting")
30 addtask checkbashisms after do_patch
32 do_checkbashisms_all[recrdeptask] = "do_checkbashisms"
33 do_checkbashisms_all[nostamp] = "1"
34 addtask checkbashisms_all after do_checkbashisms