Advertisement
RobertBerger

task debugging

Mar 24th, 2022
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. # this is a python task:
  2. python do_printdate () {
  3. import datetime
  4. # goes to cooker shell:
  5. bb.warn('py: --> S: %s <--' % (d.getVar("S", True)))
  6. bb.plain('py: Date: %s' % (datetime.date.today()))
  7. # goes to log:
  8. print(datetime.datetime.now())
  9. print(datetime.date.today())
  10. # goes to cooker shell:
  11. bb.plain("py: Check the logs!")
  12. bb.plain('py: this log file: %s/log.do_printdate' % (d.getVar("T", True)))
  13. }
  14. addtask do_printdate after do_compile before do_install
  15.  
  16. # this is a shell task:
  17. do_s () {
  18. bbwarn "shell: --> S: ${S} <--"
  19. }
  20. addtask do_s before do_printdate
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement