You are not logged in.

#1 2012-04-22 19:53:04

josephg
Member
From: Brazil
Registered: 2009-09-28
Posts: 118

[SOLVED] Bash script and comparison between $pkgver - how to?

I deal with (maintain) some lib32 packages and I'm try to make a sh script to compare version of specified packages to tell me "need to update". e.g.: ppl and lib32-ppl.
A simple [ $onepkgver -lt $otherpkgver ] will not work, because they are not integer, so I think I'll need to work on strings, splitting them for each dot found.

Any suggestion of an approach to solve this issue?

Thanks!

Last edited by josephg (2012-04-23 04:09:33)

Offline

#2 2012-04-22 19:57:25

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [SOLVED] Bash script and comparison between $pkgver - how to?

pacman (package) includes vercmp.

Last edited by Raynman (2012-04-22 19:59:04)

Offline

#3 2012-04-23 04:09:15

josephg
Member
From: Brazil
Registered: 2009-09-28
Posts: 118

Re: [SOLVED] Bash script and comparison between $pkgver - how to?

Awesome, thanks!

Offline

Board footer

Powered by FluxBB