LINUX LITE 7.2 FINAL RELEASED - SEE RELEASE ANNOUNCEMENTS SECTION FOR DETAILS


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Upgrade Script
#3
First we must ensure that the script doesn't brake anything
apt-get upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"
Code:
#!/bin/bash
#------------------------------------------------------------
# Description: Linux Lite Upgrade Script
# Author: Jerry Bezencon 2014
# Website: https://www.freecinema2022.gq
#------------------------------------------------------------

# Ensure multi-language support
export LANG=C

# Kill off any package managers that may be running
if [ "$(pidof synaptic)" ]
then
   sudo killall -9 synaptic
else
   echo""
fi

if [ -z "$(pgrep gdebi-gtk)" ]
then
   echo ""
else
   killall -9 gdebi-gtk
fi

# Linux Lite default dialog icon
ic="/usr/share/icons/zenity-llcc.png"

# Get list of available updated packages
zenity --question --title="Linux Lite Upgrade Utility" --window-icon="/usr/share/icons/zenity-llcc.png" --text="We will now Upgrade to Linux Lite 2.2\n\nClick Yes to continue or No to abort."
   if [ "$?" -eq "0" ];then

x=$( stdbuf -oL /bin/bash \-c '(sudo apt-get update \-y )' 2>&1 |
stdbuf -oL sed 's/^/#/g' |
zenity --progress --title="Updating package information..." --pulsate \
--width=600 --auto-close )

# Erase existing available info
sudo dpkg --clear-avail

  else
       exit 0
  fi

# Install new packages, remove obsolete packages, clean up
x=$( stdbuf -oL /bin/bash \-c '(stdbuf -oL /bin/bash \-c '(sudo DEBIAN_FRONTEND=noninteractive apt-get upgrade -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"  && sudo apt-get install inxi libreoffice-gnome dmz-cursor-theme file-roller lite-welcome lite-cleaner catfish deja-dup system-config-date light-locker thunar-archive-plugin \-y && sudo apt-get remove xarchiver \-y && sudo apt-get autoremove \-y && sudo apt-get clean )' 2>&1 |
stdbuf -oL sed 's/^/#/g' |
zenity --progress --title="Upgrading to Linux Lite 2.2..." --pulsate \
--width=600 --auto-close )

# Reboot dialogue
# Credit to xunil: http://bbs.archbang.org/viewtopic.php?id=279
title="Select Reboot to complete the Upgrade"
exit_type=`zenity  --width="380" --height="220" --title="$title" --list --radiolist --column="Select" \
    --column="Exit Type" --column="Description" \
    TRUE "Reboot" "Reboot your computer"\
    FALSE "Shutdown" "Shutdown your computer"\
    FALSE "Cancel" "Continue using your computer" `

# User must select a target type (Check if they cancelled)
if [ ! "$exit_type" ]; then
    zenity --error --title="Error" --text="You must make a selection"
    exit
fi

# Action to perform by user
if [ "$exit_type" = "Reboot" ]
then

        # Do Reboot here
        sudo shutdown -r now | zenity --progress --percentage=95 --title=Reboot --auto-close --auto-kill --no-cancel --width=300


elif [ "$exit_type" = "Shutdown" ]
then
    # Do Shutdown here
    sudo shutdown -h now | zenity --progress --percentage=95 --title=Shutdown --auto-close --auto-kill --no-cancel --width=300

else

    # Do Cancel here
    exit 0
fi

# Set lite-welcome to autostart on first boot - to do
# command here

# Add new wallapapers
# command here

# Change launchers from xdg-open to exo-open - to do
# command here

# Add new right click actions to Thunar - to do
# command here

# Update plymouth, lsb_release and issue files - to do
# command here

# Update to new login screen - to do
# command here

# Remove obsolete PPA's - to do
# command here
New wallpapers could be packed into package for example lite-wallpapers-2.2 or similar.
Reply


Messages In This Thread
Upgrade Script - by Valtam - 12-10-2014, 07:52 AM
Re: Upgrade Script - by sysdrum - 12-10-2014, 08:02 AM
Re: Upgrade Script - by misko_2083 - 12-12-2014, 09:57 PM
Re: Upgrade Script - by altman - 12-12-2014, 10:03 PM
Re: Upgrade Script - by misko_2083 - 12-12-2014, 10:19 PM
Re: Upgrade Script - by N4RPS - 12-22-2014, 07:55 AM
Re: Upgrade Script - by altman - 12-27-2014, 04:16 PM
Re: Upgrade Script - by Wirezfree - 01-02-2015, 11:33 AM
Re: Upgrade Script - by Valtam - 01-02-2015, 06:20 PM
Re: Upgrade Script - by Wirezfree - 01-02-2015, 06:49 PM
Re: Upgrade Script - by Valtam - 01-31-2015, 01:51 AM
Re: Upgrade Script - by Wirezfree - 01-31-2015, 09:50 AM
Re: Upgrade Script - by bitsnpcs - 01-31-2015, 03:49 PM
Re: Upgrade Script - by altman - 02-01-2015, 02:29 AM
Re: Upgrade Script - by Valtam - 02-01-2015, 04:25 AM
Re: Upgrade Script - by bitsnpcs - 02-02-2015, 11:50 PM
Re: Upgrade Script - by banko - 02-03-2015, 03:11 PM
Re: Upgrade Script - by Valtam - 02-03-2015, 05:10 PM
Re: Upgrade Script - by N4RPS - 02-05-2015, 11:30 AM
Re: Upgrade Script - by bitsnpcs - 02-05-2015, 05:46 PM
Re: Upgrade Script - by Wirezfree - 02-05-2015, 06:56 PM
Re: Upgrade Script - by Valtam - 02-06-2015, 03:06 AM
Re: Upgrade Script - by Valtam - 02-06-2015, 03:08 AM
Re: Upgrade Script - by bitsnpcs - 02-06-2015, 04:26 AM
Re: Upgrade Script - by riser - 02-06-2015, 06:04 PM
Re: Upgrade Script - by Valtam - 02-06-2015, 06:10 PM
Re: Upgrade Script - by riser - 02-06-2015, 06:35 PM
Re: Upgrade Script - by banko - 02-07-2015, 08:19 AM
Re: Upgrade Script - by N4RPS - 02-09-2015, 04:58 AM
Re: Upgrade Script - by Valtam - 02-09-2015, 11:30 AM
Re: Upgrade Script - by N4RPS - 02-10-2015, 10:39 AM
Re: Upgrade Script - by Valtam - 03-04-2015, 06:19 AM
Re: Upgrade Script - by Wirezfree - 03-04-2015, 09:49 AM
Re: Upgrade Script - by Valtam - 03-04-2015, 09:54 AM
Re: Upgrade Script - by Wirezfree - 03-04-2015, 12:14 PM
Re: Upgrade Script - by bitsnpcs - 03-04-2015, 02:41 PM
Re: Upgrade Script - by Valtam - 03-04-2015, 02:49 PM
Re: Upgrade Script - by Valtam - 03-23-2015, 11:50 AM
Re: Upgrade Script - by Wirezfree - 03-23-2015, 02:47 PM
Re: Upgrade Script - by Valtam - 03-23-2015, 02:52 PM
Re: Upgrade Script - by Wirezfree - 03-23-2015, 03:59 PM
Re: Upgrade Script - by misko_2083 - 03-23-2015, 05:54 PM
Re: Upgrade Script - by Valtam - 03-24-2015, 12:56 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)