Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. #! /usr/bin/awk -f
  2.  
  3. function include(includeFile) {INCLUDE_FILES[includeFile]}
  4. function sourceIncludes()
  5. {
  6. if(!l)
  7. {
  8. getline t < "/proc/self/cmdline"; split(t,T, "")
  9. scriptname=T[3]
  10. for (i = 1; i < ARGC; i++)
  11. args=args " "ARGV[i]
  12. for(iFile in INCLUDE_FILES )
  13. inc = inc " -f "iFile
  14. cmd=sprintf("%s %s -v l=1 -- %sn",scriptname,inc,args)
  15. system(cmd); exit
  16. }
  17. }
  18.  
  19. function pkginfo(pkg)
  20. {
  21. { print pkg }
  22. }
  23.  
  24. BEGIN {
  25. include("wrap.awk")
  26. sourceIncludes()
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement