Skip to content

Instantly share code, notes, and snippets.

@mmstick
Last active March 11, 2023 04:53
Show Gist options
  • Select an option

  • Save mmstick/8493727 to your computer and use it in GitHub Desktop.

Select an option

Save mmstick/8493727 to your computer and use it in GitHub Desktop.

Revisions

  1. mmstick revised this gist Sep 1, 2015. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion Ubuntu Kernel Upgrader Script
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,5 @@
    #!/bin/bash
    cd /tmp
    sudo rm *.deb

    if ! which lynx > /dev/null; then sudo apt-get install lynx -y; fi

  2. mmstick revised this gist Oct 13, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions Ubuntu Kernel Upgrader Script
    Original file line number Diff line number Diff line change
    @@ -13,8 +13,8 @@ function download() {
    # Kernel URL
    read -p "Do you want the latest RC?" rc
    case "$rc" in
    y* | Y*) kernelURL=$(lynx -dump http://kernel.ubuntu.com/~kernel-ppa/mainline/ | tail -1 | cut -d ' ' -f 2) ;;
    n* | N*) kernelURL=$(lynx -dump http://kernel.ubuntu.com/~kernel-ppa/mainline/ | grep -v rc | tail -1 | cut -d ' ' -f 2) ;;
    y* | Y*) kernelURL=$(lynx -dump -nonumbers http://kernel.ubuntu.com/~kernel-ppa/mainline/ | tail -1) ;;
    n* | N*) kernelURL=$(lynx -dump -nonumbers http://kernel.ubuntu.com/~kernel-ppa/mainline/ | grep -v rc | tail -1) ;;
    *) exit ;;
    esac

  3. mmstick revised this gist Sep 24, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions Ubuntu Kernel Upgrader Script
    Original file line number Diff line number Diff line change
    @@ -13,8 +13,8 @@ function download() {
    # Kernel URL
    read -p "Do you want the latest RC?" rc
    case "$rc" in
    y* | Y*) kernelURL=$(lynx -dump http://kernel.ubuntu.com/~kernel-ppa/mainline/ | tail -1 | cut -d ' ' -f 3) ;;
    n* | N*) kernelURL=$(lynx -dump http://kernel.ubuntu.com/~kernel-ppa/mainline/ | grep -v rc | tail -1 | cut -d ' ' -f 3) ;;
    y* | Y*) kernelURL=$(lynx -dump http://kernel.ubuntu.com/~kernel-ppa/mainline/ | tail -1 | cut -d ' ' -f 2) ;;
    n* | N*) kernelURL=$(lynx -dump http://kernel.ubuntu.com/~kernel-ppa/mainline/ | grep -v rc | tail -1 | cut -d ' ' -f 2) ;;
    *) exit ;;
    esac

  4. mmstick revised this gist Sep 22, 2014. 1 changed file with 2 additions and 4 deletions.
    6 changes: 2 additions & 4 deletions Ubuntu Kernel Upgrader Script
    Original file line number Diff line number Diff line change
    @@ -2,11 +2,9 @@
    cd /tmp
    sudo rm *.deb

    if [ "$(apt-cache policy lynx | grep Installed | awk -F ' ' '{print $2}')" == "(none)" ]; then
    sudo apt-get install lynx -y
    fi
    if ! which lynx > /dev/null; then sudo apt-get install lynx -y; fi

    if [ "$(getconf LONG_BIT)" = "64" ]; then arch=amd64; else arch=i386; fi
    if [ "$(getconf LONG_BIT)" == "64" ]; then arch=amd64; else arch=i386; fi

    function download() {
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | grep "$1" | grep "$2" | grep "$arch" | cut -d ' ' -f 4)
  5. mmstick revised this gist Mar 12, 2014. 1 changed file with 11 additions and 6 deletions.
    17 changes: 11 additions & 6 deletions Ubuntu Kernel Upgrader Script
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,11 @@
    #!/bin/bash
    sudo apt-get install lynx -y
    cd /tmp
    sudo rm *.deb

    if [ "$(apt-cache policy lynx | grep Installed | awk -F ' ' '{print $2}')" == "(none)" ]; then
    sudo apt-get install lynx -y
    fi

    if [ "$(getconf LONG_BIT)" = "64" ]; then arch=amd64; else arch=i386; fi

    function download() {
    @@ -12,14 +15,16 @@ function download() {
    # Kernel URL
    read -p "Do you want the latest RC?" rc
    case "$rc" in
    y*) kernelURL=$(lynx -dump http://kernel.ubuntu.com/~kernel-ppa/mainline/ | tail -1 | cut -d ' ' -f 3) ;;
    n*) kernelURL=$(lynx -dump http://kernel.ubuntu.com/~kernel-ppa/mainline/ | grep -v rc | tail -1 | cut -d ' ' -f 3) ;;
    y* | Y*) kernelURL=$(lynx -dump http://kernel.ubuntu.com/~kernel-ppa/mainline/ | tail -1 | cut -d ' ' -f 3) ;;
    n* | N*) kernelURL=$(lynx -dump http://kernel.ubuntu.com/~kernel-ppa/mainline/ | grep -v rc | tail -1 | cut -d ' ' -f 3) ;;
    *) exit ;;
    esac

    read -p "Do you want the lowlatency kernel?" lowlatency
    case "$lowlatency" in
    y*) lowlatency=1 ;;
    n*) lowlatency=0 ;;
    y* | Y*) lowlatency=1 ;;
    n* | n*) lowlatency=0 ;;
    *) exit ;;
    esac

    # Download Kernel
  6. mmstick revised this gist Feb 28, 2014. 1 changed file with 0 additions and 4 deletions.
    4 changes: 0 additions & 4 deletions Ubuntu Kernel Upgrader Script
    Original file line number Diff line number Diff line change
    @@ -22,10 +22,6 @@ case "$lowlatency" in
    n*) lowlatency=0 ;;
    esac

    latestKernel=$(echo $kernelURL | cut -d/ -f 6)
    echo "The latest kernel is $latestKernel. The currently installed kernel is $(uname -r)."
    sleep 3

    # Download Kernel
    if [ "$lowlatency" == "0" ]; then
    echo "Downloading the latest generic kernel."
  7. mmstick revised this gist Feb 28, 2014. 1 changed file with 1 addition and 5 deletions.
    6 changes: 1 addition & 5 deletions Ubuntu Kernel Upgrader Script
    Original file line number Diff line number Diff line change
    @@ -3,11 +3,7 @@ sudo apt-get install lynx -y
    cd /tmp
    sudo rm *.deb

    if [ "$(getconf LONG_BIT)" = "64" ]; then
    arch=amd64
    else
    arch=i386
    fi
    if [ "$(getconf LONG_BIT)" = "64" ]; then arch=amd64; else arch=i386; fi

    function download() {
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | grep "$1" | grep "$2" | grep "$arch" | cut -d ' ' -f 4)
  8. mmstick revised this gist Feb 18, 2014. 1 changed file with 6 additions and 5 deletions.
    11 changes: 6 additions & 5 deletions Ubuntu Kernel Upgrader Script
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@ sudo apt-get install lynx -y
    cd /tmp
    sudo rm *.deb

    if [ "$(getconf LONG_BIT)" == "64" ]; then
    if [ "$(getconf LONG_BIT)" = "64" ]; then
    arch=amd64
    else
    arch=i386
    @@ -26,16 +26,17 @@ case "$lowlatency" in
    n*) lowlatency=0 ;;
    esac

    echo "The latest kernel is $(echo $kernelURL | cut -d/ -f 6). The currently installed kernel is $(uname -r)."
    latestKernel=$(echo $kernelURL | cut -d/ -f 6)
    echo "The latest kernel is $latestKernel. The currently installed kernel is $(uname -r)."
    sleep 3

    # Download Kernel
    if [ "$lowlatency" == "0" ]; then
    echo "Downloading the latest 64-bit generic kernel."
    echo "Downloading the latest generic kernel."
    download generic header
    download generic image
    elif [ "$lowlatency" == "1" ]; then
    echo "Downloading the latest 64-bit lowlatency kernel."
    echo "Downloading the latest lowlatency kernel."
    download lowlatency header
    download lowlatency image
    fi
    @@ -46,4 +47,4 @@ wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | grep all | cut -d ' ' -f
    # Install Kernel
    echo "Installing Linux Kernel"
    sudo dpkg -i linux*.deb
    echo "Done. You may now reboot."
    echo "Done. You may now reboot."
  9. mmstick revised this gist Feb 18, 2014. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions Ubuntu Kernel Upgrader Script
    Original file line number Diff line number Diff line change
    @@ -33,15 +33,16 @@ sleep 3
    if [ "$lowlatency" == "0" ]; then
    echo "Downloading the latest 64-bit generic kernel."
    download generic header
    download all header
    download generic image
    elif [ "$lowlatency" == "1" ]; then
    echo "Downloading the latest 64-bit lowlatency kernel."
    download lowlatency header
    download all header
    download lowlatency image
    fi

    # Shared Kernel Header
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | grep all | cut -d ' ' -f 4)

    # Install Kernel
    echo "Installing Linux Kernel"
    sudo dpkg -i linux*.deb
  10. mmstick revised this gist Feb 18, 2014. 1 changed file with 0 additions and 3 deletions.
    3 changes: 0 additions & 3 deletions Ubuntu Kernel Upgrader Script
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,4 @@
    #!/bin/bash
    # Note: This script has been redesigned to support the new lowlatency+generic selection provided by Canonical.
    # Therefore, this script only works with kernel 3.14+, unless Canonical decides to provide lowlatency kernels for 3.13.
    # Dependency
    sudo apt-get install lynx -y
    cd /tmp
    sudo rm *.deb
  11. mmstick revised this gist Feb 18, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Ubuntu Kernel Upgrader Script
    Original file line number Diff line number Diff line change
    @@ -42,7 +42,7 @@ elif [ "$lowlatency" == "1" ]; then
    echo "Downloading the latest 64-bit lowlatency kernel."
    download lowlatency header
    download all header
    download lowlatency generic
    download lowlatency image
    fi

    # Install Kernel
  12. mmstick revised this gist Feb 18, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions Ubuntu Kernel Upgrader Script
    Original file line number Diff line number Diff line change
    @@ -7,9 +7,9 @@ cd /tmp
    sudo rm *.deb

    if [ "$(getconf LONG_BIT)" == "64" ]; then
    $arch=amd64
    arch=amd64
    else
    $arch=i386
    arch=i386
    fi

    function download() {
  13. mmstick revised this gist Feb 18, 2014. 1 changed file with 18 additions and 18 deletions.
    36 changes: 18 additions & 18 deletions Ubuntu Kernel Upgrader Script
    Original file line number Diff line number Diff line change
    @@ -6,6 +6,16 @@ sudo apt-get install lynx -y
    cd /tmp
    sudo rm *.deb

    if [ "$(getconf LONG_BIT)" == "64" ]; then
    $arch=amd64
    else
    $arch=i386
    fi

    function download() {
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | grep "$1" | grep "$2" | grep "$arch" | cut -d ' ' -f 4)
    }

    # Kernel URL
    read -p "Do you want the latest RC?" rc
    case "$rc" in
    @@ -23,26 +33,16 @@ echo "The latest kernel is $(echo $kernelURL | cut -d/ -f 6). The currently inst
    sleep 3

    # Download Kernel
    if [ "$(getconf LONG_BIT)" == "64" ] && [ "$lowlatency" == "0" ]; then
    if [ "$lowlatency" == "0" ]; then
    echo "Downloading the latest 64-bit generic kernel."
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '16p' | cut -d ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '20p' | cut -d ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '21p' | cut -d ' ' -f 4)
    elif [ "$(getconf LONG_BIT)" == "64" ] && [ "$lowlatency" == "1" ]; then
    download generic header
    download all header
    download generic image
    elif [ "$lowlatency" == "1" ]; then
    echo "Downloading the latest 64-bit lowlatency kernel."
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '18p' | cut -d ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '20p' | cut -d ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '23p' | cut -d ' ' -f 4)
    elif [ "$(getconf LONG_BIT)" == "32" ] && [ "$lowlatency" == "0" ]; then
    echo "Downloading the latest 32-bit generic kernel."
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '17p' | cut -d ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '20p' | cut -d ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '22p' | cut -d ' ' -f 4)
    elif [ "$(getconf LONG_BIT)" == "32" ] && [ "$lowlatency" == "1" ]; then
    echo "Downloading the latest 32-bit lowlatency kernel."
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '19p' | cut -d ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '20p' | cut -d ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '24p' | cut -d ' ' -f 4)
    download lowlatency header
    download all header
    download lowlatency generic
    fi

    # Install Kernel
  14. mmstick revised this gist Feb 4, 2014. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions Ubuntu Kernel Upgrader Script
    Original file line number Diff line number Diff line change
    @@ -20,6 +20,7 @@ case "$lowlatency" in
    esac

    echo "The latest kernel is $(echo $kernelURL | cut -d/ -f 6). The currently installed kernel is $(uname -r)."
    sleep 3

    # Download Kernel
    if [ "$(getconf LONG_BIT)" == "64" ] && [ "$lowlatency" == "0" ]; then
  15. mmstick revised this gist Feb 3, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Ubuntu Kernel Upgrader Script
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    #!/bin/bash
    # Note: This script has been redesigned to support the new lowlatency+generic selection provided by Canonical.
    # Therefore, this script only works with kernel 3.14+.
    # Therefore, this script only works with kernel 3.14+, unless Canonical decides to provide lowlatency kernels for 3.13.
    # Dependency
    sudo apt-get install lynx -y
    cd /tmp
  16. mmstick revised this gist Feb 3, 2014. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions Ubuntu Kernel Upgrader Script
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,6 @@
    #!/bin/bash
    # Note: This script has been redesigned to support the new lowlatency+generic selection provided by Canonical.
    # Therefore, this script only works with kernel 3.14+.
    # Dependency
    sudo apt-get install lynx -y
    cd /tmp
  17. mmstick revised this gist Feb 3, 2014. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions Ubuntu Kernel Upgrader Script
    Original file line number Diff line number Diff line change
    @@ -20,22 +20,22 @@ esac
    echo "The latest kernel is $(echo $kernelURL | cut -d/ -f 6). The currently installed kernel is $(uname -r)."

    # Download Kernel
    if [ "$(uname -m)" == "x86_64" ] && [ "$lowlatency" == "0" ]; then
    if [ "$(getconf LONG_BIT)" == "64" ] && [ "$lowlatency" == "0" ]; then
    echo "Downloading the latest 64-bit generic kernel."
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '16p' | cut -d ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '20p' | cut -d ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '21p' | cut -d ' ' -f 4)
    elif [ "$(uname -m)" == "x86_64" ] && [ "$lowlatency" == "1" ]; then
    elif [ "$(getconf LONG_BIT)" == "64" ] && [ "$lowlatency" == "1" ]; then
    echo "Downloading the latest 64-bit lowlatency kernel."
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '18p' | cut -d ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '20p' | cut -d ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '23p' | cut -d ' ' -f 4)
    elif [ "$(uname -m)" == "i386" ] && [ "$lowlatency" == "0" ]; then
    elif [ "$(getconf LONG_BIT)" == "32" ] && [ "$lowlatency" == "0" ]; then
    echo "Downloading the latest 32-bit generic kernel."
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '17p' | cut -d ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '20p' | cut -d ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '22p' | cut -d ' ' -f 4)
    elif [ "$(uname -m)" == "i386" ] && [ "$lowlatency" == "1" ]; then
    elif [ "$(getconf LONG_BIT)" == "32" ] && [ "$lowlatency" == "1" ]; then
    echo "Downloading the latest 32-bit lowlatency kernel."
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '19p' | cut -d ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '20p' | cut -d ' ' -f 4)
  18. mmstick revised this gist Feb 3, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions Ubuntu Kernel Upgrader Script
    Original file line number Diff line number Diff line change
    @@ -31,12 +31,12 @@ elif [ "$(uname -m)" == "x86_64" ] && [ "$lowlatency" == "1" ]; then
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '20p' | cut -d ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '23p' | cut -d ' ' -f 4)
    elif [ "$(uname -m)" == "i386" ] && [ "$lowlatency" == "0" ]; then
    echo "Downloading the latest 32-bit kernel."
    echo "Downloading the latest 32-bit generic kernel."
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '17p' | cut -d ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '20p' | cut -d ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '22p' | cut -d ' ' -f 4)
    elif [ "$(uname -m)" == "i386" ] && [ "$lowlatency" == "1" ]; then
    echo "Downloading the latest 32-bit kernel."
    echo "Downloading the latest 32-bit lowlatency kernel."
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '19p' | cut -d ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '20p' | cut -d ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '24p' | cut -d ' ' -f 4)
  19. mmstick revised this gist Feb 3, 2014. 1 changed file with 10 additions and 12 deletions.
    22 changes: 10 additions & 12 deletions Ubuntu Kernel Upgrader Script
    Original file line number Diff line number Diff line change
    @@ -5,19 +5,17 @@ cd /tmp
    sudo rm *.deb

    # Kernel URL
    read -p "Do you want the latest RC?" -n 1 -r
    if [[ $REPLY =~ ^[Yy]$ ]]; then
    kernelURL=$(lynx -dump http://kernel.ubuntu.com/~kernel-ppa/mainline/ | tail -1 | cut -d ' ' -f 3)
    else
    kernelURL=$(lynx -dump http://kernel.ubuntu.com/~kernel-ppa/mainline/ | grep -v rc | tail -1 | cut -d ' ' -f 3)
    fi
    read -p "Do you want the latest RC?" rc
    case "$rc" in
    y*) kernelURL=$(lynx -dump http://kernel.ubuntu.com/~kernel-ppa/mainline/ | tail -1 | cut -d ' ' -f 3) ;;
    n*) kernelURL=$(lynx -dump http://kernel.ubuntu.com/~kernel-ppa/mainline/ | grep -v rc | tail -1 | cut -d ' ' -f 3) ;;
    esac

    read -p "Do you want the lowlatency kernel?" -n 1 -r
    if [[ $REPLY =~ ^[Yy]$ ]]; then
    lowlatency=1
    else
    lowlatency=0
    fi
    read -p "Do you want the lowlatency kernel?" lowlatency
    case "$lowlatency" in
    y*) lowlatency=1 ;;
    n*) lowlatency=0 ;;
    esac

    echo "The latest kernel is $(echo $kernelURL | cut -d/ -f 6). The currently installed kernel is $(uname -r)."

  20. mmstick revised this gist Feb 3, 2014. 1 changed file with 23 additions and 6 deletions.
    29 changes: 23 additions & 6 deletions Ubuntu Kernel Upgrader Script
    Original file line number Diff line number Diff line change
    @@ -5,26 +5,43 @@ cd /tmp
    sudo rm *.deb

    # Kernel URL
    read -p "Do you want the latest RC? " -n 1 -r
    read -p "Do you want the latest RC?" -n 1 -r
    if [[ $REPLY =~ ^[Yy]$ ]]; then
    kernelURL=$(lynx -dump http://kernel.ubuntu.com/~kernel-ppa/mainline/ | tail -1 | cut -d ' ' -f 3)
    else
    kernelURL=$(lynx -dump http://kernel.ubuntu.com/~kernel-ppa/mainline/ | grep -v rc | tail -1 | cut -d ' ' -f 3)
    fi

    read -p "Do you want the lowlatency kernel?" -n 1 -r
    if [[ $REPLY =~ ^[Yy]$ ]]; then
    lowlatency=1
    else
    lowlatency=0
    fi

    echo "The latest kernel is $(echo $kernelURL | cut -d/ -f 6). The currently installed kernel is $(uname -r)."

    # Download Kernel
    if [ "$(uname -m)" == "x86_64" ]; then
    echo "Downloading the latest 64-bit kernel."
    if [ "$(uname -m)" == "x86_64" ] && [ "$lowlatency" == "0" ]; then
    echo "Downloading the latest 64-bit generic kernel."
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '16p' | cut -d ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '20p' | cut -d ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '21p' | cut -d ' ' -f 4)
    elif [ "$(uname -m)" == "x86_64" ] && [ "$lowlatency" == "1" ]; then
    echo "Downloading the latest 64-bit lowlatency kernel."
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '18p' | cut -d ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '19p' | cut -d ' ' -f 4)
    else
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '20p' | cut -d ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '23p' | cut -d ' ' -f 4)
    elif [ "$(uname -m)" == "i386" ] && [ "$lowlatency" == "0" ]; then
    echo "Downloading the latest 32-bit kernel."
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '17p' | cut -d ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '18p' | cut -d ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '20p' | cut -d ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '22p' | cut -d ' ' -f 4)
    elif [ "$(uname -m)" == "i386" ] && [ "$lowlatency" == "1" ]; then
    echo "Downloading the latest 32-bit kernel."
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '19p' | cut -d ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '20p' | cut -d ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '24p' | cut -d ' ' -f 4)
    fi

    # Install Kernel
  21. mmstick revised this gist Feb 3, 2014. 1 changed file with 8 additions and 8 deletions.
    16 changes: 8 additions & 8 deletions Ubuntu Kernel Upgrader Script
    Original file line number Diff line number Diff line change
    @@ -7,24 +7,24 @@ sudo rm *.deb
    # Kernel URL
    read -p "Do you want the latest RC? " -n 1 -r
    if [[ $REPLY =~ ^[Yy]$ ]]; then
    kernelURL=$(lynx -dump http://kernel.ubuntu.com/~kernel-ppa/mainline/ | tail -1 | cut -d\ ' ' -f 3)
    kernelURL=$(lynx -dump http://kernel.ubuntu.com/~kernel-ppa/mainline/ | tail -1 | cut -d ' ' -f 3)
    else
    kernelURL=$(lynx -dump http://kernel.ubuntu.com/~kernel-ppa/mainline/ | grep -v rc | tail -1 | cut -d\ ' ' -f 3)
    kernelURL=$(lynx -dump http://kernel.ubuntu.com/~kernel-ppa/mainline/ | grep -v rc | tail -1 | cut -d ' ' -f 3)
    fi

    echo "The latest kernel is $(echo $kernelURL | cut -d/ -f 6). The currently installed kernel is $(uname -r)."

    # Download Kernel
    if [ "$(uname -m)" == "x86_64" ]; then
    echo "Downloading the latest 64-bit kernel."
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '16p' | cut -d\ ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '18p' | cut -d\ ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '19p' | cut -d\ ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '16p' | cut -d ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '18p' | cut -d ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '19p' | cut -d ' ' -f 4)
    else
    echo "Downloading the latest 32-bit kernel."
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '17p' | cut -d\ ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '18p' | cut -d\ ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '20p' | cut -d\ ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '17p' | cut -d ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '18p' | cut -d ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '20p' | cut -d ' ' -f 4)
    fi

    # Install Kernel
  22. mmstick revised this gist Feb 3, 2014. 1 changed file with 8 additions and 8 deletions.
    16 changes: 8 additions & 8 deletions Ubuntu Kernel Upgrader Script
    Original file line number Diff line number Diff line change
    @@ -7,24 +7,24 @@ sudo rm *.deb
    # Kernel URL
    read -p "Do you want the latest RC? " -n 1 -r
    if [[ $REPLY =~ ^[Yy]$ ]]; then
    kernelURL=$(lynx -dump http://kernel.ubuntu.com/~kernel-ppa/mainline/ | tail -1 | cut -d\ -f 3)
    kernelURL=$(lynx -dump http://kernel.ubuntu.com/~kernel-ppa/mainline/ | tail -1 | cut -d\ ' ' -f 3)
    else
    kernelURL=$(lynx -dump http://kernel.ubuntu.com/~kernel-ppa/mainline/ | grep -v rc | tail -1 | cut -d\ -f 3)
    kernelURL=$(lynx -dump http://kernel.ubuntu.com/~kernel-ppa/mainline/ | grep -v rc | tail -1 | cut -d\ ' ' -f 3)
    fi

    echo "The latest kernel is $(echo $kernelURL | cut -d/ -f 6). The currently installed kernel is $(uname -r)."

    # Download Kernel
    if [ "$(uname -m)" == "x86_64" ]; then
    echo "Downloading the latest 64-bit kernel."
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '16p' | cut -d\ -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '18p' | cut -d\ -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '19p' | cut -d\ -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '16p' | cut -d\ ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '18p' | cut -d\ ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '19p' | cut -d\ ' ' -f 4)
    else
    echo "Downloading the latest 32-bit kernel."
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '17p' | cut -d\ -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '18p' | cut -d\ -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '20p' | cut -d\ -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '17p' | cut -d\ ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '18p' | cut -d\ ' ' -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '20p' | cut -d\ ' ' -f 4)
    fi

    # Install Kernel
  23. mmstick revised this gist Jan 25, 2014. 1 changed file with 8 additions and 8 deletions.
    16 changes: 8 additions & 8 deletions Ubuntu Kernel Upgrader Script
    Original file line number Diff line number Diff line change
    @@ -7,24 +7,24 @@ sudo rm *.deb
    # Kernel URL
    read -p "Do you want the latest RC? " -n 1 -r
    if [[ $REPLY =~ ^[Yy]$ ]]; then
    kernelURL=$(lynx -dump http://kernel.ubuntu.com/~kernel-ppa/mainline/ | tail -1 | sed 's/^......//')
    kernelURL=$(lynx -dump http://kernel.ubuntu.com/~kernel-ppa/mainline/ | tail -1 | cut -d\ -f 3)
    else
    kernelURL=$(lynx -dump http://kernel.ubuntu.com/~kernel-ppa/mainline/ | grep -v rc | tail -1 | sed 's/^......//')
    kernelURL=$(lynx -dump http://kernel.ubuntu.com/~kernel-ppa/mainline/ | grep -v rc | tail -1 | cut -d\ -f 3)
    fi

    echo "The latest kernel is $(echo $kernelURL | cut -d/ -f 6). The currently installed kernel is $(uname -r)."

    # Download Kernel
    if [ "$(uname -m)" == "x86_64" ]; then
    echo "Downloading the latest 64-bit kernel."
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '16p' | sed 's/^......//')
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '18p' | sed 's/^......//')
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '19p' | sed 's/^......//')
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '16p' | cut -d\ -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '18p' | cut -d\ -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '19p' | cut -d\ -f 4)
    else
    echo "Downloading the latest 32-bit kernel."
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '17p' | sed 's/^......//')
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '18p' | sed 's/^......//')
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '20p' | sed 's/^......//')
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '17p' | cut -d\ -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '18p' | cut -d\ -f 4)
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '20p' | cut -d\ -f 4)
    fi

    # Install Kernel
  24. mmstick revised this gist Jan 20, 2014. 1 changed file with 14 additions and 16 deletions.
    30 changes: 14 additions & 16 deletions Ubuntu Kernel Upgrader Script
    Original file line number Diff line number Diff line change
    @@ -6,27 +6,25 @@ sudo rm *.deb

    # Kernel URL
    read -p "Do you want the latest RC? " -n 1 -r
    if [[ $REPLY =~ ^[Yy]$ ]]
    then
    kernelURL=$(lynx -dump http://kernel.ubuntu.com/~kernel-ppa/mainline/ | tail -1 | sed 's/^......//')
    else
    kernelURL=$(lynx -dump http://kernel.ubuntu.com/~kernel-ppa/mainline/ | grep -v rc | tail -1 | sed 's/^......//')
    if [[ $REPLY =~ ^[Yy]$ ]]; then
    kernelURL=$(lynx -dump http://kernel.ubuntu.com/~kernel-ppa/mainline/ | tail -1 | sed 's/^......//')
    else
    kernelURL=$(lynx -dump http://kernel.ubuntu.com/~kernel-ppa/mainline/ | grep -v rc | tail -1 | sed 's/^......//')
    fi

    echo "The latest kernel is $(echo $kernelURL | cut -d/ -f 6). The currently installed kernel is $(uname -r)."

    # Download Kernel
    if [ "$(uname -m)" == "x86_64" ]
    then
    echo "Downloading the latest 64-bit kernel."
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '16p' | sed 's/^......//')
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '18p' | sed 's/^......//')
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '19p' | sed 's/^......//')
    else
    echo "Downloading the latest 32-bit kernel."
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '17p' | sed 's/^......//')
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '18p' | sed 's/^......//')
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '20p' | sed 's/^......//')
    if [ "$(uname -m)" == "x86_64" ]; then
    echo "Downloading the latest 64-bit kernel."
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '16p' | sed 's/^......//')
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '18p' | sed 's/^......//')
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '19p' | sed 's/^......//')
    else
    echo "Downloading the latest 32-bit kernel."
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '17p' | sed 's/^......//')
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '18p' | sed 's/^......//')
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '20p' | sed 's/^......//')
    fi

    # Install Kernel
  25. mmstick revised this gist Jan 19, 2014. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion Ubuntu Kernel Upgrader Script
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,6 @@ sudo rm *.deb

    # Kernel URL
    read -p "Do you want the latest RC? " -n 1 -r
    echo # (optional) move to a new line
    if [[ $REPLY =~ ^[Yy]$ ]]
    then
    kernelURL=$(lynx -dump http://kernel.ubuntu.com/~kernel-ppa/mainline/ | tail -1 | sed 's/^......//')
  26. mmstick created this gist Jan 18, 2014.
    36 changes: 36 additions & 0 deletions Ubuntu Kernel Upgrader Script
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,36 @@
    #!/bin/bash
    # Dependency
    sudo apt-get install lynx -y
    cd /tmp
    sudo rm *.deb

    # Kernel URL
    read -p "Do you want the latest RC? " -n 1 -r
    echo # (optional) move to a new line
    if [[ $REPLY =~ ^[Yy]$ ]]
    then
    kernelURL=$(lynx -dump http://kernel.ubuntu.com/~kernel-ppa/mainline/ | tail -1 | sed 's/^......//')
    else
    kernelURL=$(lynx -dump http://kernel.ubuntu.com/~kernel-ppa/mainline/ | grep -v rc | tail -1 | sed 's/^......//')
    fi

    echo "The latest kernel is $(echo $kernelURL | cut -d/ -f 6). The currently installed kernel is $(uname -r)."

    # Download Kernel
    if [ "$(uname -m)" == "x86_64" ]
    then
    echo "Downloading the latest 64-bit kernel."
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '16p' | sed 's/^......//')
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '18p' | sed 's/^......//')
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '19p' | sed 's/^......//')
    else
    echo "Downloading the latest 32-bit kernel."
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '17p' | sed 's/^......//')
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '18p' | sed 's/^......//')
    wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | sed -n '20p' | sed 's/^......//')
    fi

    # Install Kernel
    echo "Installing Linux Kernel"
    sudo dpkg -i linux*.deb
    echo "Done. You may now reboot."