#!/bin/bash
arch="$(curl -s https://www.archlinux.org/packages/core/x86_64/linux/ | grep version | cut -d "\"" -f 4 | cut -d "-" -f 1)"
fedora="$(curl -s https://apps.fedoraproject.org/packages/kernel-core | grep package-name | cut -d ">" -f 2 | cut -d "-" -f 1 | head -1)"
version_gt() { test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" != "$1"; }

version_gt $fedora $arch
ret=$?

if [[ $ret -eq 0 ]];
then
        echo "why the fuck would you want the newest kernel?... Thanks, but I prefer a system that actually works."
else
        echo "Omfg can you believe these scrubs using that old kernel? I've been on `uname -a` for 6 weeks."
fi
