Hey ,
For a while now , the Difficulty for new users to install PPAs has annoyed me quite a bit . People end up downloading Debs that don't stay updated , or generally making mistakes in the installation , It complicates things for new users , So i'm working on a system to make PPA installations Smoother ,It's a bash + Zenity Script that will allow ppa's to be installed from a .usi file (or ubuntu Software installer) , a format which i invented for that purpose.
Here's the installer script :
Code:
#load the file and variables
FILE=$(zenity --file-selection --title "Select A Ubuntu Software Installer")
PPANAME=$(cat $FILE | head -2 | tail -1)
PACKLIST=$(cat $FILE | head -4 | tail -1)
PROGNAME=$(cat $FILE | head -6 | tail -1)
DESCRIPTION=$(cat $FILE | head -8 | tail -1)
OFFICIALORNOT=$(cat $FILE | head -10 | tail -1)
#Welcome the user ,Explain the situation"
zenity --info --title "USI Software Installer - $PROGNAME" --text="You wish to install $PROGNAME.
$PROGNAME will be automatically updated via PPA.
The following packages will be installed : $PACKLIST From the PPA $PPANAME .
Description : $DESCRIPTION .
This is a $OFFICIALORNOT Source for this program"
#Ask them if they wish to continue
zenity --question --text="Are you sure you wish to install "
if [ $? == 0 ]
then
{
sleep 2
zenity --info --title 'Preparing install' --text="Commencing installation after you press OK, you will be required to enter your password to continue"
sleep 1
PASSWORD=$(zenity --password)
sleep 1
echo $PASSWORD | sudo -S apt-add-repository $PPANAME
sleep 1
zenity --info --title 'Installation progress' --text="Repository Installed , Commencing Installation when you press OK , this could take a few minutes depending on the size of the program , This may dissapear for a while , You can continue working until a completion message is displayed ."
sleep 1
echo $PASSWORD | sudo -S apt-get update
echo $PASSWORD | sudo -S apt-get -y install $PACKLIST
zenity --info --title 'Install Completed' --text="The Install has been completed. Thankyou for Installing $PROGNAME , Have a nice day :) ."
sleep 2
}
else
zenity --info --title "you have chosen not to install" --TEXT="ohnoz!"
exit
fi
exit
and here's an example of a program :
Code:
#ppa
ppa:docky-core/ppa
#packages
docky
#programname
Docky
#Description
The Best dock no money can buy !
#officialornot
official
My problem is that it runs fine , no problems in Terminal ,however if I try just running it , It doesn't work (i think it might be APT): It gets to The Question and then just cuts out. Also I wish to use progress bars for the installation progress , and want to replace package selection by browse to just double clicking on the .upi and launching it with the Upi installer .
Any help would be much appreciated .
-jman6495
Bookmarks