Skip to content
Browse files

Add support for finding latest kernels per major release

(ketchup 3, ketchup-3-rc, ketchup 4 etc)

Signed-off-by: Stratos Psomadakis <psomas@cslab.ece.ntua.gr>
  • Loading branch information...
1 parent 7cb92e2 commit 8cd1d0621d9dbece47eb8528bde17bbce8dd2967 @psomas committed Jul 27, 2011
Showing with 9 additions and 3 deletions.
  1. +9 −3 ketchup
View
12 ketchup
@@ -1,6 +1,6 @@
#!/usr/bin/python
#
-# ketchup 1.0.1
+# ketchup 1.1
# http://github.com/psomas/ketchup
# git://github.com/psomas/ketchup.git
#
@@ -29,7 +29,7 @@
# ketchup <version>
#
# where version is a complete kernel version, or a branch name to grab
-# the latest version
+# the latest version (see the available trees)
#
# You can override some variables by creating a ~/.ketchuprc file.
# The ~/.ketchuprc is just a Python script, eg. it might look like this:
@@ -723,10 +723,16 @@ def install_nearest(ver):
return ver
def find_ver(ver):
- t = []
m = re.match(r'mainline.*', ver)
if m:
t = latest_major()
+ else:
+ m = re.match(r'(\d+)(-rc|-git)?$', ver)
+ if m:
+ t = tree(m.group(1) + '.0')
+ ver = 'mainline'
+ if m.group(2):
+ ver += m.group(2)
if ver in version_info.keys():
v = version_info[ver]

0 comments on commit 8cd1d06

Please sign in to comment.
Something went wrong with that request. Please try again.