diff options
author | Nat Lasseter <Nat Lasseter nathan@bytemark.co.uk> | 2018-02-23 10:48:48 +0000 |
---|---|---|
committer | Nat Lasseter <Nat Lasseter nathan@bytemark.co.uk> | 2018-02-23 10:48:48 +0000 |
commit | 2d6b956b7339b049e37d2db88631b77c8735376c (patch) | |
tree | 8aee28fbacdca64ff916e2295eaac5af054cfa55 /debian | |
parent | 1894a84c4a4cf2e954c3b9567fd7d31adfce8b39 (diff) |
[debian] fix keys
Diffstat (limited to 'debian')
-rwxr-xr-x | debian | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -23,25 +23,27 @@ $map = [ $stable = 9 def extras(keys) - if keys.include?($stable.to_s) then - return ["stable"] + if keys.include?(($stable-2).to_s) then + return ["oldoldstable"] elsif keys.include?(($stable-1).to_s) then return ["oldstable"] - elsif keys.include?(($stable-1).to_s) then + elsif keys.include?($stable.to_s) then + return ["stable"] + elsif keys.include?(($stable+1).to_s) then return ["testing"] - elsif keys.include?(($stable-2).to_s) then - return ["oldoldstable"] else return [] end end def find(elem) - s = $map.select { |entry| + s = $map.map { |entry| + entry + extras(entry) + }.select { |entry| entry.include?(elem) }.first return nil if s.nil? - return s - [elem] + extras(s) + return s - [elem] end if ARGV.length != 1 then |