Yeah, it seems really complicated at first glance, but its actually pretty simple once you've created a few. Its just a matter of setting up a file descriptor that you assign to the progress bar, then echo the information into the file descriptor and the progress bar reads that back and updates its text accordingly.
Honestly the trickier part when I was making some of this stuff was figuring out how to get the info from the lines of stdout that I wanted and excluding the rest. A little experimenting with grep and awk/cut usually sorts most of that out though,
Edit: Also, one thing I've seen some people get confused about with cocoaDialog. Even if just using an "indeterminate" progress bar, the KEY is to make sure the first part of the echoed line is a number. Follow that up with whatever information you grepped out from the process you're running. That tells the progress bar to update its text line. Without that digit up front it will ignore everything else after it and remain with the initial text you set it up with during the whole run.