[Libreoffice] Debugging Make Fetch bash scripts on Mac OS X 10.6.7

Tor Lillqvist tlillqvist at novell.com
Tue May 17 23:43:17 PDT 2011


> The file libo/src/fetch.log has entries such as this:
> 
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

> But my copy of the terminal log shows this:

Clearly this kind of output is useful only when running the download interactively. For some reason I don't see anything like that in my fetch.log, and donät remember seeing it on the terminal either. I nthe fetch.log I just see occasional lines like

2011-05-06 16:40:34 URL:http://download.go-oo.org/src/29721a16f25967d59969d5f0ae485b4a-libwps-0.2.2.tar.bz2 [295486/295486] -> "29721a16f25967d59969d5f0ae485b4a-libwps-0.2.2.tar.bz2" [1]

but mostly just lines with only a timestamp (which are pointless I think and could be removed).

Is it wget or curl that outputs the thing you see? I would have thought that they would be clever enough to not print anything like that if stdout is not a terminal. Could you please investigate if there is some switch to pass to wget or curl to get them to be less chatty, and then use that option if test ! -t 1 , or something.

> Question 2: How do I go about stepping through bash scipts? 

Eh, I had no idea that there even was a bash debugger, nice!

Traditionally one just uses debugging prints, i.e. "echo" statements, to debug shell scripts... As the bashdb configure script says, if you want to use it, you need a newer bash, so you need to build it yourself.

--tml



More information about the LibreOffice mailing list