0 Members and 1 Guest are viewing this topic.
Quote from: ralphy on April 27, 2017, 12:32:14 AMHmmm... could it be considered as a Lite Tweak maybe? That application is for Mainline kernels and it will require adding PPAs and what not. A simple Lite Tweak addition could possibly cover this... the code is already there for the most part. Maybe
Hmmm... could it be considered as a Lite Tweak maybe? That application is for Mainline kernels and it will require adding PPAs and what not. A simple Lite Tweak addition could possibly cover this... the code is already there for the most part.
#! /bin/bash#--------------------------------------------------------------------------------------------------------# Name: Lite Kernel Select# Description: Select a Linux Kernel to install on Linux Lite.# Authors: Jerry Bezencon# Website: https://www.linuxliteos.com#--------------------------------------------------------------------------------------------------------# Ensure multi-language supportexport LANG=C# Kill off any package managers that may be runningif [ "$(pidof synaptic)" ]then sudo killall -9 synapticfiif [ ! -z "$(pgrep gdebi-gtk)" ]then killall -9 gdebi-gtkfi# Set the window icon variableic="/usr/share/icons/zenity-llcc.png"# Set the Title bar variabletb="Lite Kernel Select"# Download message variabledl="Downloading and installing Kernel"# Update package listzenity --question --title="$tb" --window-icon="$ic" --text="We will now fetch the Updates list.\n\nClick Yes to continue or No to abort." if [ "$?" -eq "0" ];then APTUPDATE=$(grep '^deb' -c /etc/apt/sources.list) # Total of repositories registered, this is approximated sudo apt-get update 2>&1 | awk -v total=$APTUPDATE '/^Ign|^ Get/{count++;$1=""} FNR { if (total != 0){percentage=int (100*count/total);print (percentage < 90?percentage:90),"\n#",substr($0, 0, 128) }; fflush(stdout)}' \ | zenity --progress --text="Updating package lists..." --window-icon=$ic --title="Updating Software Sources - please wait..." --percentage=0 --auto-close --width=600 if [ "${PIPESTATUS[0]}" -ne "0" ]; then unset APTUPDATE zenity --error \ --title="Error" --text="$APPNAME couldn't fetch the package cache information lists." exit 1 fiunset APTUPDATEKERNLIST=$(zenity --title="Select a Kernel from the list" \--height=300 --width="320" \--list --radiolist --text "Select a Kernel to install:" \--column "Select" --column "Kernel Version" \FALSE "Kernel 3.15.0" \FALSE "Kernel 3.16.0" \FALSE "Kernel 3.17.0" \FALSE "Kernel 3.18.0" \FALSE "Kernel 3.19.0" \FALSE "Kernel 4.0.0" \FALSE "Kernel 4.1.0" \FALSE "Kernel 4.2.0" \FALSE "Kernel 4.3.0" \FALSE "Kernel 4.4.0" \FALSE "Kernel 4.5.0" \FALSE "Kernel 4.6.0" \FALSE "Kernel 4.7.0")if [[ "$KERNLIST" =~ "Kernel 3.15.0" ]]; then apt-get install linux-headers-linuxlite-3.15.0 linux-image-linuxlite-3.15.0 -y | zenity --progress --title="$tb" --text="$dl 3.15.0, please standby..." --pulsate --auto-kill --auto-closeelif [[ "$KERNLIST" =~ "Kernel 3.16.0" ]]; then apt-get install linux-headers-linuxlite-3.16.0 linux-image-linuxlite-3.16.0 -y | zenity --progress --title="$tb" --text="$dl 3.16.0, please standby..." --pulsate --auto-kill --auto-closeelif [[ "$KERNLIST" =~ "Kernel 3.17.0" ]]; then apt-get install linux-headers-linuxlite-3.17.0 linux-image-linuxlite-3.17.0 -y | zenity --progress --title="$tb" --text="$dl 3.17.0, please standby..." --pulsate --auto-kill --auto-closeelif [[ "$KERNLIST" =~ "Kernel 3.18.0" ]]; then apt-get install linux-headers-linuxlite-3.18.0 linux-image-linuxlite-3.18.0 -y | zenity --progress --title="$tb" --text="$dl 3.18.0, please standby..." --pulsate --auto-kill --auto-closeelif [[ "$KERNLIST" =~ "Kernel 3.19.0" ]]; then apt-get install linux-headers-linuxlite-3.19.0 linux-image-linuxlite-3.19.0 -y | zenity --progress --title="$tb" --text="$dl 3.19.0, please standby..." --pulsate --auto-kill --auto-closeelif [[ "$KERNLIST" =~ "Kernel 4.0.0" ]]; then apt-get install linux-headers-linuxlite-4.0.0 linux-image-linuxlite-4.0.0 -y | zenity --progress --title="$tb" --text="$dl 4.0.0, please standby..." --pulsate --auto-kill --auto-closeelif [[ "$KERNLIST" =~ "Kernel 4.1.0" ]]; then apt-get install linux-headers-linuxlite-4.1.0 linux-image-linuxlite-4.1.0 -y | zenity --progress --title="$tb" --text="$dl 4.1.0, please standby..." --pulsate --auto-kill --auto-closeelif [[ "$KERNLIST" =~ "Kernel 4.2.0" ]]; then apt-get install linux-headers-linuxlite-4.2.0 linux-image-linuxlite-4.2.0 -y | zenity --progress --title="$tb" --text="$dl 4.2.0, please standby..." --pulsate --auto-kill --auto-closeelif [[ "$KERNLIST" =~ "Kernel 4.3.0" ]]; then apt-get install linux-headers-linuxlite-4.3.0 linux-image-linuxlite-4.3.0 -y | zenity --progress --title="$tb" --text="$dl 4.3.0, please standby..." --pulsate --auto-kill --auto-closeelif [[ "$KERNLIST" =~ "Kernel 4.4.0" ]]; then apt-get install linux-headers-linuxlite-4.4.0 linux-image-linuxlite-4.4.0 -y | zenity --progress --title="$tb" --text="$dl 4.4.0, please standby..." --pulsate --auto-kill --auto-closeelif [[ "$KERNLIST" =~ "Kernel 4.5.0" ]]; then apt-get install linux-headers-linuxlite-4.5.0 linux-image-linuxlite-4.5.0 -y | zenity --progress --title="$tb" --text="$dl 4.5.0, please standby..." --pulsate --auto-kill --auto-closeelif [[ "$KERNLIST" =~ "Kernel 4.6.0" ]]; then apt-get install linux-headers-linuxlite-4.6.0 linux-image-linuxlite-4.6.0 -y | zenity --progress --title="$tb" --text="$dl 4.6.0, please standby..." --pulsate --auto-kill --auto-closeelif [[ "$KERNLIST" =~ "Kernel 4.7.0" ]]; then apt-get install linux-headers-linuxlite-4.7.0 linux-image-linuxlite-4.7.0 -y | zenity --progress --title="$tb" --text="$dl 4.7.0, please standby..." --pulsate --auto-kill --auto-close else zenity --error \ --title="Error" --text="There was an error while\nDownloading and installing the Kernel!" fifiexit 0