summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorNat Lasseter <Nat Lasseter nathan@bytemark.co.uk>2018-02-23 10:48:48 +0000
committerNat Lasseter <Nat Lasseter nathan@bytemark.co.uk>2018-02-23 10:48:48 +0000
commit2d6b956b7339b049e37d2db88631b77c8735376c (patch)
tree8aee28fbacdca64ff916e2295eaac5af054cfa55 /debian
parent1894a84c4a4cf2e954c3b9567fd7d31adfce8b39 (diff)
[debian] fix keys
Diffstat (limited to 'debian')
-rwxr-xr-xdebian16
1 files changed, 9 insertions, 7 deletions
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