Advertisement
Guest User

Untitled

a guest
Apr 30th, 2013
742
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.48 KB | None | 0 0
  1. #!/bin/sh
  2. # https://github.com/GM-Script-Writer-62850/Ubuntu-Mainline-Kernel-Updater#readme
  3. # This script is for installing from a recovery console where you can't copy/paste
  4. if [ "$USER" = "root" ];then
  5.     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."
  6.     exit 1
  7. fi
  8. cd /tmp
  9. zip="Ubuntu-Mainline-Kernel-Updater.zip"
  10. targz="Ubuntu-Mainline-Kernel-Updater.tar.gz"
  11. url="//github.com/GM-Script-Writer-62850/Ubuntu-Mainline-Kernel-Updater"
  12. if [ ! -f "/usr/bin/unzip" ] && [ ! -f "/usr/bin/tar" ] && [ ! -f "/usr/bin/git" ];then
  13.     echo "You need to install tar, unzip, or git to  this script."
  14.     exit 1
  15. fi
  16. if [ -f "/usr/bin/git" ];then
  17.     git clone "git:$url"
  18. elif [ -f "/usr/bin/wget" ];then
  19.     if [ -f "/usr/bin/tar" ];then
  20.         wget "https:$url/archive/master.tar.gz" -O "$targz"
  21.     else
  22.         wget "https:$url/archive/master.zip" -O "$zip"
  23.     fi
  24. elif [ -f "/usr/bin/curl" ];then
  25.     if [ -f "/usr/bin/tar" ];then
  26.         curl "https:$url/archive/master.tar.gz" > "$targz"
  27.     else
  28.         curl "https:$url/archive/master.zip" > "$zip"
  29.     fi
  30. else
  31.     echo "You need to install git, curl, or wget to run this script."
  32.     exit 1
  33. fi
  34. if [ -f "/tmp/$zip" ] || [ -f "/tmp/$targz" ];then
  35.     if [ -f "/tmp/$targz" ];then
  36.         tar -zxvf "$targz"
  37.     else
  38.         unzip "$zip"
  39.     fi
  40.     bash "Ubuntu-Mainline-Kernel-Updater-master/install"
  41. else
  42.     bash "Ubuntu-Mainline-Kernel-Updater/install"
  43. fi
  44. KernelUpdateChecker -no-rc
  45. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement