#!/bin/bash

#The library directly from the latest commit (0901e7855f922e770cbfeb58262cb8fded518190)
#of the git repo
. "/home/tal/Documents/grub/util/grub-mkconfig_lib.in"

list='2.4.19-120 2.4.19-246 2.4.19-290 2.4.19-304 2.4.21-138 2.4.21-278 2.6.5-7.97 2.6.5-7.104 2.6.5-7.111 2.6.5-7.111.5 2.6.5-7.111.19 2.6.5-7.111.30 2.6.5-7.139 2.6.5-7.145 2.6.5-7.147 2.6.5-7.151 2.6.5-7.155.29 2.6.5-7.191 2.6.5-7.193 2.6.5-7.201 2.6.5-7.202.7 2.6.5-7.244 2.6.5-7.252 2.6.5-7.257 2.6.5-7.267 2.6.5-7.276 2.6.5-7.282 2.6.5-7.283 2.6.5-7.286 2.6.5-7.287.3 2.6.5-7.308 2.6.5-7.311 2.6.5-7.312 2.6.5-7.314 2.6.5-7.315 2.6.5-7.316 2.6.5-7.317 2.6.5-7.318 2.6.5-7.319 2.6.5-7.321 2.6.5-7.322 2.6.5-7.323 2.6.5-7.324 2.6.5-7.325 2.6.16.21-0.8 2.6.16.21-0.15 2.6.16.21-0.25 2.6.16.27-0.6 2.6.16.27-0.9 2.6.16.46-0.12 2.6.16.46-0.14 2.6.16.53-0.8 2.6.16.53-0.16 2.6.16.53-0.18 2.6.16.54-0.2.3 2.6.16.54-0.2.5 2.6.16.54-0.2.8 2.6.16.54-0.2.10 2.6.16.54-0.2.11 2.6.16.54-0.2.12 2.6.16.60-0.21 2.6.16.60-0.23 2.6.16.60-0.25 2.6.16.60-0.27 2.6.16.60-0.29 2.6.16.60-0.30 2.6.16.60-0.31 2.6.16.60-0.33 2.6.16.60-0.34 2.6.16.60-0.35 2.6.16.60-0.37 2.6.16.60-0.39.3 2.6.16.60-0.42.4 2.6.16.60-0.42.5 2.6.16.60-0.42.7 2.6.16.60-0.42.8 2.6.16.60-0.42.9 2.6.16.60-0.42.10 2.6.16.60-0.42.11 2.6.16.60-0.42.54.1 2.6.16.60-0.54.5 2.6.16.60-0.57.1 2.6.16.60-0.58.1 2.6.16.60-0.59.1 2.6.16.60-0.60.1 2.6.16.60-0.62.1 2.6.16.60-0.66.1 2.6.16.60-0.67.1 2.6.16.60-0.68.1 2.6.16.60-0.69.1 2.6.16.60-0.74.7 2.6.16.60-0.76.8 2.6.16.60-0.77.1 2.6.16.60-0.79.1 2.6.16.60-0.81.2 2.6.16.60-0.83.2 2.6.16.60-0.85.1 2.6.16.60-0.87.1 2.6.16.60-0.89.1 2.6.16.60-0.91.1 2.6.16.60-0.93.1 2.6.16.60-0.95.1 2.6.16.60-0.97.1 2.6.16.60-0.99.1 2.6.16.60-0.101.1 2.6.16.60-0.103.1 2.6.16.60-0.105.1 2.6.16.60-0.107.1 2.6.16.60-0.113.1 2.6.16.60-0.123.1 2.6.27.19-5.1 2.6.27.21-0.1.2 2.6.27.23-0.1.1 2.6.27.25-0.1.1 2.6.27.29-0.1.1 2.6.27.37-0.1.1 2.6.27.39-0.3.1 2.6.27.42-0.1.1 2.6.27.45-0.1.1 2.6.27.48-0.1.1 2.6.27.48-0.6.1 2.6.27.48-0.12.1 2.6.27.54-0.2.1 2.6.32.12-0.7.1 2.6.32.13-0.4.1 2.6.32.13-0.5.1 2.6.32.19-0.2.1 2.6.32.19-0.3.1 2.6.32.23-0.3.1 2.6.32.24-0.2.1 2.6.32.27-0.2.2 2.6.32.29-0.3.1 2.6.32.36-0.5.2 2.6.32.43-0.4.1 2.6.32.45-0.3.2 2.6.32.46-0.3.1 2.6.32.49-0.3.1 2.6.32.54-0.3.1 2.6.32.59-0.3.1 2.6.32.59-0.7.1 2.6.32.59-0.9.1 2.6.32.59-0.13.1 3.0.13-0.27.1 3.0.26-0.7.6 3.0.31-0.9.1 3.0.34-0.7.9 3.0.38-0.5.1 3.0.42-0.7.3 3.0.51-0.7.9.1 3.0.58-0.6.2.1 3.0.58-0.6.6.1 3.0.74-0.6.6.2 3.0.74-0.6.8.1 3.0.74-0.6.10.1 3.0.76-0.11.1 3.0.80-0.5.1 3.0.80-0.7.1 3.0.82-0.7.9 3.0.93-0.5.1 3.0.93-0.8.2 3.0.101-0.5.1 3.0.101-0.7.15.1 3.0.101-0.7.17.1 3.0.101-0.7.19.1 3.0.101-0.7.21.1 3.0.101-0.8.1 3.0.101-0.15.1 3.0.101-0.21.1 3.0.101-0.29.1 3.0.101-0.31.1 3.0.101-0.35.1 3.10.0-123 3.10.0-123.4.4'

echo "Sorted List:"
while [ "x$list" != "x" ] ; do
  linux=`version_find_latest $list`
  echo $linux
  list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
done

