I want to write a script to find the latest version of rpm of a given package available from a mirror for eg: http://mirror.centos.org/centos/5/os/x86_64/CentOS/ Is there any existing script that does this? Or can someone give me a general idea on how to go about this?
john blair wrote:
I want to write a script to find the latest version of rpm of a given package available from a mirror for eg: http://mirror.centos.org/centos/5/os/x86_64/CentOS/ Is there any existing script that does this? Or can someone give me a general idea on how to go about this?
yum list packagename
I should have mentioned that I am looking for a solution that I can even run from my debian box (i.e no yum)
--- On Thu, 12/10/09, john blair mailtome200420032002@yahoo.com wrote:
From: john blair mailtome200420032002@yahoo.com Subject: [CentOS] find latest version of rpms from a mirror To: centos@centos.org Date: Thursday, December 10, 2009, 12:20 PM I want to write a script to find the latest version of rpm of a given package available from a mirror for eg: http://mirror.centos.org/centos/5/os/x86_64/CentOS/ Is there any existing script that does this? Or can someone give me a general idea on how to go about this?
_______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
From: john blair mailtome200420032002@yahoo.com
I want to write a script to find the latest version of rpm of a given package available from a mirror for eg: http://mirror.centos.org/centos/5/os/x86_64/CentOS/ Is there any existing script that does this? Or can someone give me a general idea on how to go about this?
Example:
URL='http://mirror.centos.org/centos/5/os/x86_64/CentOS/' PKG=... links -dump $URL | grep "$URL$PKG-[0-9]" | cut -f2 -d' '
Replace with 'cut -d'/' -f9' if you don't want the full URL...
JD