On Jan 7, 2012 7:37 AM, "Allan McRae" <allan@xxxxxxxxxxxxx> wrote: > > On 07/01/12 22:30, Corrado Primier wrote: > > 2012/1/7 Don Juan <donjuansjiz@xxxxxxxxx>: > >> The problem I have run into and can not seem to find info about or something > >> I have ever run into is that it seems bsdtar when extracting is making the > >> name as name_2.0.1-BETA1 and not making it name_2.0.1-beta1 and makepkg > >> fails saying it can not find the proper file of name_2.0.1-beta1. > > > > There is a nice construct in bash (beware: version 4 only) which > > allows you to make something uppercase with brace expansion. > > Look at this: > > > > [bardo@antani ~]$ pkgver=2.0.1-beta1 > > [bardo@antani ~]$ echo ${pkgver^^} > > 2.0.1-BETA1 > > > > 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? :) > > > > I'd just go for something like this: > > _pkgver=2.0.1-BETA1 > pkgver=2.0.1beta1 > > No need for all that fancy stuff... > > Allan Lol Allan. I'm also learning how to make my PKGBUILDs better and learningfmore Bash scripting. So I'm reading the posts and its like I completely forgot to go the simple route and declare two variables.