Skip to content

Instantly share code, notes, and snippets.

@lingo lingo/kernel_upg.sh
Created May 22, 2014

Embed
What would you like to do?
Kernel upgrade script for *buntu
#!/bin/sh
echo "$(tput setaf 3)--- Kernel 3.13 will be installed in an `uname -i` system---$(tput sgr0)"
echo ""
sleep 2
read -p "Press Enter to continue, or abort by pressing CTRL+C" nothing
echo ""
echo ""
#i386 links
link1="http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.13-trusty/linux-headers-3.13.0-031300_3.13.0-031300.201401192235_all.deb"
link2="http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.13-trusty/linux-headers-3.13.0-031300-generic_3.13.0-031300.201401192235_i386.deb"
link3="http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.13-trusty/linux-image-3.13.0-031300-generic_3.13.0-031300.201401192235_i386.deb"
#amd64 links
url1="http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.13-trusty/linux-headers-3.13.0-031300-generic_3.13.0-031300.201401192235_amd64.deb"
url2="http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.13-trusty/linux-image-3.13.0-031300-generic_3.13.0-031300.201401192235_amd64.deb"
#System architecture
arch=`uname -m`
if [ $arch = i686 ] || [ $arch = i386 ]; then
mkdir -p $HOME/kernel-i386
cd $HOME/kernel-i386
wget -c $link1
wget -c $link2
wget -c $link3
sudo dpkg -i *.deb
sudo rm -rf $HOME/kernel-i386
elif [ $arch = "x86_64" ]; then
mkdir -p $HOME/kernel-amd64
cd $HOME/kernel-amd64
wget -c $link1
wget -c $url1
wget -c $url2
sudo dpkg -i *.deb
sudo rm -rf $HOME/kernel-amd64
else
echo "Unsupported Architecture"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.