Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # https://github.com/GM-Script-Writer-62850/Ubuntu-Mainline-Kernel-Updater#readme
- # This script is for installing from a recovery console where you can't copy/paste
- if [ "$USER" = "root" ];then
- echo "Do not run me as root\nRoot can run me using this:\n\tsudo -u userNameOtherThanRoot $(basename $0)\n\tuserNameOtherThanRoot needs to be your user login name."
- exit 1
- fi
- cd /tmp
- zip="Ubuntu-Mainline-Kernel-Updater.zip"
- targz="Ubuntu-Mainline-Kernel-Updater.tar.gz"
- url="//github.com/GM-Script-Writer-62850/Ubuntu-Mainline-Kernel-Updater"
- if [ ! -f "/usr/bin/unzip" ] && [ ! -f "/usr/bin/tar" ] && [ ! -f "/usr/bin/git" ];then
- echo "You need to install tar, unzip, or git to this script."
- exit 1
- fi
- if [ -f "/usr/bin/git" ];then
- git clone "git:$url"
- elif [ -f "/usr/bin/wget" ];then
- if [ -f "/usr/bin/tar" ];then
- wget "https:$url/archive/master.tar.gz" -O "$targz"
- else
- wget "https:$url/archive/master.zip" -O "$zip"
- fi
- elif [ -f "/usr/bin/curl" ];then
- if [ -f "/usr/bin/tar" ];then
- curl "https:$url/archive/master.tar.gz" > "$targz"
- else
- curl "https:$url/archive/master.zip" > "$zip"
- fi
- else
- echo "You need to install git, curl, or wget to run this script."
- exit 1
- fi
- if [ -f "/tmp/$zip" ] || [ -f "/tmp/$targz" ];then
- if [ -f "/tmp/$targz" ];then
- tar -zxvf "$targz"
- else
- unzip "$zip"
- fi
- bash "Ubuntu-Mainline-Kernel-Updater-master/install"
- else
- bash "Ubuntu-Mainline-Kernel-Updater/install"
- fi
- KernelUpdateChecker -no-rc
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement