Skip to content

Instantly share code, notes, and snippets.

@drinkcat
Created January 7, 2015 19:06
Show Gist options
  • Save drinkcat/c8c9ed9fc13540a557f4 to your computer and use it in GitHub Desktop.
Save drinkcat/c8c9ed9fc13540a557f4 to your computer and use it in GitHub Desktop.
Last time a given Chromium OS was active in any stable channel
#!/bin/sh -e
set -e
wget http://cros-omahaproxy.appspot.com/history -O history
grep "stable-channel" history | awk -F, '
{
"date -d\"" $1 "\" +\"%s\"" | getline date
version=$2
gsub(/\..*$/, "", version)
machine=$4 "," $5
if (lastdate[machine] && !lastseen[version]) {
lastseen[version] = lastdate[machine]
}
lastdate[machine] = date
}
END {
for (version in lastseen) {
"date -d\"@" lastseen[version] "\" +\"%Y-%m-%d %H:%M:%S\"" | getline date
print version "," date
}
}
' | sort -n
1193,2012-02-24 21:24:36
1412,2012-04-05 18:14:37
1660,2012-07-13 20:03:43
2046,2012-07-13 20:03:44
2268,2012-10-24 16:19:16
2465,2013-02-14 23:03:38
2913,2013-03-21 21:48:23
3428,2013-05-28 15:35:17
3701,2013-06-24 18:09:08
3912,2013-07-30 15:06:47
4100,2013-08-29 21:50:38
4319,2013-12-10 16:49:30
4537,2013-12-03 16:54:54
4731,2014-02-24 19:31:27
4920,2014-03-11 14:37:03
5116,2014-05-27 18:09:31
5500,2014-07-21 20:27:48
5712,2014-08-12 16:31:29
5841,2014-11-20 23:18:31
5978,2014-11-20 23:32:36
6158,2014-12-04 17:26:25
6310,2015-01-07 07:21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment