ava1ar / customizepkg

A tool for Arch Linux package manager pacman to modify PKGBUILD automatically
GNU General Public License v3.0
49 stars 14 forks source link

The ability to add a new line #7

Closed xuhdev closed 9 years ago

xuhdev commented 10 years ago

It seems that the latest version does not support adding a new line, which makes it hard to apply an additional patch. Could you add this functionality to customizepkg?

Thanks!

stevenhoneyman commented 10 years ago

I'll leave this issue "open" as I agree, it does need adding (patching and line editing both actually)... I just haven't had much time to work on this recently.

In the mean time, you can add a new line with a little "hack" quite easily. For example (just taken straight from my glances customizepkg file):

replace#package#images}$#&\n rm -r "$pkgdir/usr/share/locale/de"\n echo "/usr/bin/python2 -m glances" >"$pkgdir/usr/bin/glances"
nogweii commented 9 years ago

With PR #14, your glances line can be as simple as:

addline#package#python2#echo '#!/usr/bin/python2 -m glances' > $pkgdir/usr/bin/glances