Advertisement
Guest User

Donald iljazi VirianArt

a guest
Apr 8th, 2008
453
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 6.52 KB | None | 0 0
  1. #! /usr/bin/env python
  2. import os
  3. print " \n\
  4. ======================================================\n\
  5. | This script fetches the latest svn-version of the  |\n\
  6. | KGRUBEditor.                                       |\n\
  7. | Credits:                                           |\n\
  8. | KGRUBEditor:                                       |\n\
  9. | Head_Developer: Art_Fowl                           |\n\
  10. | Graphics: hoagie2                                  |\n\
  11. | Installation Script: VirianArt (Donald iljazi      |\n\
  12. ======================================================\n\
  13. "
  14. print "Welcome to KGRUBEditor installation script by, Donald iljazi, aka VirianArt"
  15. print " "
  16. print "[1] Import backport repositories, also download and install KGRUBEditor"
  17. print "(recommended)"
  18. print " "
  19. print "[2] Import backport repositories in your sources.list"
  20. print " "
  21. print "[3] Download and install KGRUBEditor"
  22. print "(Requires having ubuntu backport repositories enabled)"
  23. print " "
  24.  
  25. choice = input('Please what do you want to do (choose one of the given option): ')
  26. if choice == 1:
  27.     print "Importing backport repositories..."
  28.     os.system('echo "deb http://gr.archive.ubuntu.com/ubuntu/ gutsy-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list')
  29.     os.system('echo "deb-src http://gr.archive.ubuntu.com/ubuntu/ gutsy-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list')
  30.     print " "
  31.     print "Updating your /etc/apt/sources.list..."
  32.     print "Installing the Dependencies..."
  33.     print "If the script asks you to give your root password, please give it"
  34.     print "It is necessary for the installation"
  35.     os.system("sudo apt-get update")
  36.     print " "
  37.     print "Proceeding with the installation: kdebase-runtime packages"
  38.     print " "
  39.     os.system("sudo apt-get install kdebase-runtime")
  40.     print "Proceeding with the installation: kdebase-dev-kde4"
  41.     print " "
  42.     os.system("sudo apt-get install kdebase-dev-kde4")
  43.     print "Proceeding with the installation: cmake"
  44.     print " "
  45.     os.system("sudo apt-get install cmake")
  46.     print "Proceeding with the installation: subversion"
  47.     print " "
  48.     os.system("sudo apt-get install subversion")
  49.     print "Proceeding with the installation: build-essential"
  50.     print " "
  51.     os.system("sudo apt-get install build-essential")
  52.     print "Exporting LD_Library_PATH=/usr/lib/kdes/lib"
  53.     print " "
  54.     os.system("export LD_LIBRARY_PATH=/usr/lib/kde4/lib")
  55.     print "Exporting KDEDIRS=/usr/lib/kde4"
  56.     print " "
  57.     os.system("export KDEDIRS=/usr/lib/kde4")
  58.     print "Exporting PATH=/usr/lib/kde4/bin/:$PATH"
  59.     print " "
  60.     os.system("export PATH=/usr/lib/kde4/bin/:$PATH")
  61.     print "Exporting export KDEHOME=~/.kde4"
  62.     print " "
  63.     os.system("export KDEHOME=~/.kde4")
  64.     print " "
  65.     print "Downloading the latest KGRUBEditor from svn repository"
  66.     print " "
  67.     print "Creating ./svn Directory in users home directory"
  68.     print " "
  69.     os.system("mkdir /home/$(whoami)/svn")
  70.     print "Browsing ./svn Directory"
  71.     print " "
  72.     os.system("cd /home/$(whoami)/svn")
  73.     print "Fetching KGRUBEditor..."
  74.     print " "
  75.     os.system("svn co https://kgrubeditor.svn.sourceforge.net/svnroot/kgrubeditor kgrubeditor")
  76.     print "Browsing ./kgrubeditor Directory"
  77.     print " "
  78.     os.system("cd ./kgrubeditor")
  79.     print "Creating ./build Directory"
  80.     print " "
  81.     os.system("mkdir ./build")
  82.     print "Browsing ./buid Directory"
  83.     print " "
  84.     os.system("cd ./build")
  85.     print "Creating ./install Directory"
  86.     print " "
  87.     os.system("mkdir ./install")
  88.     print "Compiling KGRUBEditor..."
  89.     print " "
  90.     os.system("cmake .. -DCMAKE_INSTALL_PREFIX=/home/$(whoami)/svn/kgrubeditor/build/install")
  91.     print "Installing..."
  92.     print " "
  93.     os.system("make install")
  94.     print "Thank you for using KGRUBEditor Installer and KGRUBEditor"
  95.     print " "
  96.     print "Enjoy KGRUBEditor!"
  97. elif choice == 2:
  98.     print "Importing backport repositories..."
  99.     os.system('echo "deb http://gr.archive.ubuntu.com/ubuntu/ gutsy-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list')
  100.     os.system('echo "deb-src http://gr.archive.ubuntu.com/ubuntu/ gutsy-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list')
  101.     print "Thank you for using KGRUBEditor Installer and KGRUBEditor"
  102.     print " "
  103.     print "Enjoy KGRUBEditor!"
  104. elif choice == 3:
  105.     print "Updating your /etc/apt/sources.list..."
  106.     print "Installing the Dependencies..."
  107.     print "If the script asks you to give your root password, please give it"
  108.     print "It is necessary for the installation"
  109.     os.system("sudo apt-get update")
  110.     print " "
  111.     print "Proceeding with the installation: kdebase-runtime packages"
  112.     print " "
  113.     os.system("sudo apt-get install kdebase-runtime")
  114.     print "Proceeding with the installation: kdebase-dev-kde4"
  115.     print " "
  116.     os.system("sudo apt-get install kdebase-dev-kde4")
  117.     print "Proceeding with the installation: cmake"
  118.     print " "
  119.     os.system("sudo apt-get install cmake")
  120.     print "Proceeding with the installation: subversion"
  121.     print " "
  122.     os.system("sudo apt-get install subversion")
  123.     print "Proceeding with the installation: build-essential"
  124.     print " "
  125.     os.system("sudo apt-get install build-essential")
  126.     print "Exporting LD_Library_PATH=/usr/lib/kdes/lib"
  127.     print " "
  128.     os.system("export LD_LIBRARY_PATH=/usr/lib/kde4/lib")
  129.     print "Exporting KDEDIRS=/usr/lib/kde4"
  130.     print " "
  131.     os.system("export KDEDIRS=/usr/lib/kde4")
  132.     print "Exporting PATH=/usr/lib/kde4/bin/:$PATH"
  133.     print " "
  134.     os.system("export PATH=/usr/lib/kde4/bin/:$PATH")
  135.     print "Exporting export KDEHOME=~/.kde4"
  136.     print " "
  137.     os.system("export KDEHOME=~/.kde4")
  138.     print " "
  139.     print "Downloading the latest KGRUBEditor from svn repository"
  140.     print " "
  141.     print "Creating ./svn Directory in users home directory"
  142.     print " "
  143.     os.system("mkdir /home/$(whoami)/svn")
  144.     print "Browsing ./svn Directory"
  145.     print " "
  146.     os.system("cd /home/$(whoami)/svn")
  147.     print "Fetching KGRUBEditor..."
  148.     print " "
  149.     os.system("svn co https://kgrubeditor.svn.sourceforge.net/svnroot/kgrubeditor kgrubeditor")
  150.     print "Browsing ./kgrubeditor Directory"
  151.     print " "
  152.     os.system("cd ./kgrubeditor")
  153.     print "Creating ./build Directory"
  154.     print " "
  155.     os.system("mkdir ./build")
  156.     print "Browsing ./buid Directory"
  157.     print " "
  158.     os.system("cd ./build")
  159.     print "Creating ./install Directory"
  160.     print " "
  161.     os.system("mkdir ./install")
  162.     print "Compiling KGRUBEditor..."
  163.     print " "
  164.     os.system("cmake .. -DCMAKE_INSTALL_PREFIX=/home/$(whoami)/svn/kgrubeditor/build/install")
  165.     print "Installing..."
  166.     print " "
  167.     os.system("make install")
  168.     print "Thank you for using KGRUBEditor Installer and KGRUBEditor"
  169.     print " "
  170.     print "Enjoy KGRUBEditor!"
  171. else:
  172.     print "Wrong choice"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement