Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/env python
- import os
- print " \n\
- ======================================================\n\
- | This script fetches the latest svn-version of the |\n\
- | KGRUBEditor. |\n\
- | Credits: |\n\
- | KGRUBEditor: |\n\
- | Head_Developer: Art_Fowl |\n\
- | Graphics: hoagie2 |\n\
- | Installation Script: VirianArt (Donald iljazi |\n\
- ======================================================\n\
- "
- print "Welcome to KGRUBEditor installation script by, Donald iljazi, aka VirianArt"
- print " "
- print "[1] Import backport repositories, also download and install KGRUBEditor"
- print "(recommended)"
- print " "
- print "[2] Import backport repositories in your sources.list"
- print " "
- print "[3] Download and install KGRUBEditor"
- print "(Requires having ubuntu backport repositories enabled)"
- print " "
- choice = input('Please what do you want to do (choose one of the given option): ')
- if choice == 1:
- print "Importing backport repositories..."
- os.system('echo "deb http://gr.archive.ubuntu.com/ubuntu/ gutsy-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list')
- os.system('echo "deb-src http://gr.archive.ubuntu.com/ubuntu/ gutsy-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list')
- print " "
- print "Updating your /etc/apt/sources.list..."
- print "Installing the Dependencies..."
- print "If the script asks you to give your root password, please give it"
- print "It is necessary for the installation"
- os.system("sudo apt-get update")
- print " "
- print "Proceeding with the installation: kdebase-runtime packages"
- print " "
- os.system("sudo apt-get install kdebase-runtime")
- print "Proceeding with the installation: kdebase-dev-kde4"
- print " "
- os.system("sudo apt-get install kdebase-dev-kde4")
- print "Proceeding with the installation: cmake"
- print " "
- os.system("sudo apt-get install cmake")
- print "Proceeding with the installation: subversion"
- print " "
- os.system("sudo apt-get install subversion")
- print "Proceeding with the installation: build-essential"
- print " "
- os.system("sudo apt-get install build-essential")
- print "Exporting LD_Library_PATH=/usr/lib/kdes/lib"
- print " "
- os.system("export LD_LIBRARY_PATH=/usr/lib/kde4/lib")
- print "Exporting KDEDIRS=/usr/lib/kde4"
- print " "
- os.system("export KDEDIRS=/usr/lib/kde4")
- print "Exporting PATH=/usr/lib/kde4/bin/:$PATH"
- print " "
- os.system("export PATH=/usr/lib/kde4/bin/:$PATH")
- print "Exporting export KDEHOME=~/.kde4"
- print " "
- os.system("export KDEHOME=~/.kde4")
- print " "
- print "Downloading the latest KGRUBEditor from svn repository"
- print " "
- print "Creating ./svn Directory in users home directory"
- print " "
- os.system("mkdir /home/$(whoami)/svn")
- print "Browsing ./svn Directory"
- print " "
- os.system("cd /home/$(whoami)/svn")
- print "Fetching KGRUBEditor..."
- print " "
- os.system("svn co https://kgrubeditor.svn.sourceforge.net/svnroot/kgrubeditor kgrubeditor")
- print "Browsing ./kgrubeditor Directory"
- print " "
- os.system("cd ./kgrubeditor")
- print "Creating ./build Directory"
- print " "
- os.system("mkdir ./build")
- print "Browsing ./buid Directory"
- print " "
- os.system("cd ./build")
- print "Creating ./install Directory"
- print " "
- os.system("mkdir ./install")
- print "Compiling KGRUBEditor..."
- print " "
- os.system("cmake .. -DCMAKE_INSTALL_PREFIX=/home/$(whoami)/svn/kgrubeditor/build/install")
- print "Installing..."
- print " "
- os.system("make install")
- print "Thank you for using KGRUBEditor Installer and KGRUBEditor"
- print " "
- print "Enjoy KGRUBEditor!"
- elif choice == 2:
- print "Importing backport repositories..."
- os.system('echo "deb http://gr.archive.ubuntu.com/ubuntu/ gutsy-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list')
- os.system('echo "deb-src http://gr.archive.ubuntu.com/ubuntu/ gutsy-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list')
- print "Thank you for using KGRUBEditor Installer and KGRUBEditor"
- print " "
- print "Enjoy KGRUBEditor!"
- elif choice == 3:
- print "Updating your /etc/apt/sources.list..."
- print "Installing the Dependencies..."
- print "If the script asks you to give your root password, please give it"
- print "It is necessary for the installation"
- os.system("sudo apt-get update")
- print " "
- print "Proceeding with the installation: kdebase-runtime packages"
- print " "
- os.system("sudo apt-get install kdebase-runtime")
- print "Proceeding with the installation: kdebase-dev-kde4"
- print " "
- os.system("sudo apt-get install kdebase-dev-kde4")
- print "Proceeding with the installation: cmake"
- print " "
- os.system("sudo apt-get install cmake")
- print "Proceeding with the installation: subversion"
- print " "
- os.system("sudo apt-get install subversion")
- print "Proceeding with the installation: build-essential"
- print " "
- os.system("sudo apt-get install build-essential")
- print "Exporting LD_Library_PATH=/usr/lib/kdes/lib"
- print " "
- os.system("export LD_LIBRARY_PATH=/usr/lib/kde4/lib")
- print "Exporting KDEDIRS=/usr/lib/kde4"
- print " "
- os.system("export KDEDIRS=/usr/lib/kde4")
- print "Exporting PATH=/usr/lib/kde4/bin/:$PATH"
- print " "
- os.system("export PATH=/usr/lib/kde4/bin/:$PATH")
- print "Exporting export KDEHOME=~/.kde4"
- print " "
- os.system("export KDEHOME=~/.kde4")
- print " "
- print "Downloading the latest KGRUBEditor from svn repository"
- print " "
- print "Creating ./svn Directory in users home directory"
- print " "
- os.system("mkdir /home/$(whoami)/svn")
- print "Browsing ./svn Directory"
- print " "
- os.system("cd /home/$(whoami)/svn")
- print "Fetching KGRUBEditor..."
- print " "
- os.system("svn co https://kgrubeditor.svn.sourceforge.net/svnroot/kgrubeditor kgrubeditor")
- print "Browsing ./kgrubeditor Directory"
- print " "
- os.system("cd ./kgrubeditor")
- print "Creating ./build Directory"
- print " "
- os.system("mkdir ./build")
- print "Browsing ./buid Directory"
- print " "
- os.system("cd ./build")
- print "Creating ./install Directory"
- print " "
- os.system("mkdir ./install")
- print "Compiling KGRUBEditor..."
- print " "
- os.system("cmake .. -DCMAKE_INSTALL_PREFIX=/home/$(whoami)/svn/kgrubeditor/build/install")
- print "Installing..."
- print " "
- os.system("make install")
- print "Thank you for using KGRUBEditor Installer and KGRUBEditor"
- print " "
- print "Enjoy KGRUBEditor!"
- else:
- print "Wrong choice"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement