On Tue, Jan 16, 2007 at 10:35:42PM +0100, Wael Nasreddine <[EMAIL PROTECTED]>
wrote:
> Well of course, it's only a sed command, needs adjusting, I agree that it's
> ugly, but I did this way myself to guarantee that the Substitution/adding
> works...
>
> Anyway I'll try to adjust it (even that I'm not a sed expert).
what about something like this?
if [ "`grep -c sha1sums= FrugalBuild`" -gt 1 ]; then
# handle the problem about complex sha1sums like-archspecific
ones:
# bail out with an error or so
fi
if grep sha1sums= FrugalBuild; then
Fmessage "updating \$sha1sums() in the FrugalBuild"
if grep -q '^sha1sums.*)' FrugalBuild; then
sed -i "/^sha1sums.*)/d" FrugalBuild
else
sed -i "/^sha1sums/,/)/d" FrugalBuild
fi
makepkg -dg >>FrugalBuild
fi
this way we would not need such ### FOO ### blocks imho
udv / greetings,
VMiklos
--
Developer of Frugalware Linux, to make things frugal - http://frugalware.org
_______________________________________________
Frugalware-devel mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-devel