#!/bin/bash
echo ""
echo "Bodhi Application Installer"
echo "Liferea"
echo ""
zenity --question --title="Bodhi Application Installer" --text="Would you like to install Liferea?"
if [ $? == 1 ]
then
zenity --info --title="Bodhi Application Installer" --text="Liferea was not installed. Thanks for using Bodhi!"
exit 1
fi
zenity --info --title="Bodhi Application Installer" --text="Click OK and enter your password to install Liferea"
gksudo echo "Gaining root..."
sudo rm -rf /var/lib/apt/lists/*
sudo mkdir /var/lib/apt/lists/partial
sudo rm -rf /var/cache/apt/archives/*
sudo mkdir /var/cache/apt/archives/partial
if [ "$1" == debug ]
then
echo "Moving data into apt cache"
sudo cp -f lists/* /var/lib/apt/lists/
sudo cp *.deb /var/cache/apt/archives/ | zenity --progress --pulsate --auto-kill --title="Bodhi Application Installer" --text="Preparing Files..." --width=600
echo "Installing Liferea via apt"
sudo apt-get -y --force-yes --no-download --ignore-missing install liferea | zenity --text-info --title="Bodhi Application Installer" --width=800 --height=600
exit 0
fi
sudo cp -f lists/* /var/lib/apt/lists/
sudo cp *.deb /var/cache/apt/archives/ | zenity --progress --pulsate --auto-kill --title="Bodhi Application Installer" --text="Preparing Files..." --width=600
sudo apt-get -y --force-yes --no-download --ignore-missing install liferea | zenity --progress --pulsate --auto-kill --title="Bodhi Application Installer" --text="Installing Liferea..." --width=600
zenity --info --title="Bodhi Application Installer" --text="Liferea Installed\nFind it in your applications menu under Internet"
exit 0