[arch-general] PKGBUILD question

Mantas M. grawity at gmail.com
Sat Jan 7 07:32:42 EST 2012


On Sat, Jan 07, 2012 at 01:30:11PM +0100, Corrado Primier wrote:
> The only problem in your specific situation is the need to also change
> '-' in '_'. That would require a double brace expansion, but I'm not
> sure it is possible. If it is, it seems to be undocumented. The
> cleanest way I could come up with is:
> 
> $(sed 's/-/_/' <<<${pkgver^^})
> 
> Not very nice, huh? :)

Double brace expansion works like this:

	_pkgdir=${pkgver^^}
	_pkgdir=${_pkgdir//-/_}

	cd "$srcdir/$pkgname-$_pkgdir"

-- 
Mantas M.


More information about the arch-general mailing list