From 2d6b956b7339b049e37d2db88631b77c8735376c Mon Sep 17 00:00:00 2001 From: Nat Lasseter Date: Fri, 23 Feb 2018 10:48:48 +0000 Subject: [debian] fix keys --- debian | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'debian') diff --git a/debian b/debian index ebde8b7..2c33d59 100755 --- a/debian +++ b/debian @@ -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 -- cgit v1.2.1