Re: "$startdir/src", "$startdir/pkg" and "|| return 1" in official packages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Fri, Sep 17, 2010 at 03:35:58PM +0200, Lukas Fleischer wrote:
> Although this isn't really significant... I was just curious :)
> 
> `grep '${\?startdir}\?/src' /var/abs/*/*/PKGBUILD | wc -l` - "648"
> 
> `grep '${\?startdir}\?/pkg' /var/abs/*/*/PKGBUILD | wc -l` - "1385"
> 
> `fgrep '|| return 1' /var/abs/*/*/PKGBUILD | wc -l` - "9274"
> 
> Isn't that something that could be fixed easily using sed(1)/awk(1)?
> E.g. using:
> 
> `find . -name 'PKGBUILD' -exec sed -i 's/$startdir\/src/$srcdir/g;
> s/${startdir}\/src/${srcdir}/g; s/$startdir\/pkg/$pkgdir/g;
> s/${startdir}\/pkg/${pkgdir}/g' {} ';'`
> 
> ... to replace all that "$startdir/[...]" stuff?

Sounds good conceptionally to me.  However, wouldn't you need to
escape the '$' signs as well? With regexp, the '$' means the end of
the expression string.


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux