Fixing Arch Puppy bugs

Thanks to Michael, who reported bugs in 0setup for the Arch build, and even fixed one.

There are actually 4 or 5 bugs, mainly because the package maintainers are a bit whimsical in how they enter data into the package database.

I think just one more bug to fix, but I'm stuck on this one. A package maintainer has this in the PKGBUILD database file:

depends=('gtk2' 'libpng' 'libtiff' 'readline' 'freetype2' 'libsm' \
'librsvg')

Normally they put it all on one line, but the '\' escape stuffs up my Bash code that reads the dependencies.

So, how can I read the file, wherever there is a '\' on the end, delete the carriage-return character?

Would I have to pre-process it:

cat PKGBUILD |
while read ONELINE
do
echo "$ONELINE" >> PKGBUID-FIXED
done

Anyway, I should have the Arch build fixed soon and will upload bugfixed script.


Posted on 23 Mar 2009, 18:02


Comments:

Posted on 24 Mar 2009, 6:51 by Dougal
reading multi-lines
while read ONELINE
do
# whatever you want
done< $PKGBUILD


Posted on 24 Mar 2009, 8:47 by BarryK
Re: multilines
Dougal,
yeah, that what I did. The Arch build alpha3.1 should be working.