get rid of default text editor, replace with gedit

#!/usr/bin/python
# -*- coding: utf-8 -*-
#   This library is free software; you can redistribute it and/or
#   modify it under the terms of the GNU Lesser General Public
#   License as published by the Free Software Foundation; either
#   version 2.1 of the License, or (at your option) any later version.
#
#   This library is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
#   Lesser General Public License for more details.
#
#   You should have received a copy of the GNU Lesser General Public
#   License along with this library; if not, write to the
#      Free Software Foundation, Inc.,
#      59 Temple Place, Suite 330,
#      Boston, MA  02111-1307  USA
#
# http://spoilernaruto.com
# Install gedit on Slackware 13.37 Xfce
# This was written for educational purpose only. Use it at your own risk.
# Author will be not responsible for any damage!
import os, time

files = ('http://ftp.gnome.org/pub/gnome/sources/ORBit2/2.14/ORBit2-2.14.19.tar.bz2',
 'http://ftp.gnome.org/pub/GNOME/sources/GConf/2.9/GConf-2.9.91.tar.gz',
 'http://slackbuilds.org/slackbuilds/13.37/libraries/gtksourceview.tar.gz',
 'http://slackbuilds.org/slackbuilds/13.37/development/gedit.tar.gz',
 'http://ftp.gnome.org/pub/gnome/sources/gtksourceview/2.11/gtksourceview-2.11.2.tar.gz',
 'ftp://ftp.gnome.org/pub/gnome/sources/gedit/2.30/gedit-2.30.4.tar.bz2')
log = 'gedit.log'
file = open(log, 'a')
def main():
    print '\n\nInstall gedit on Slackware 13.37 Xfce'
    print 'Muffat19@gmail.com | https://muffat19.wordpress.com\n'
    print '[!] Downloading files...'
    time.sleep(2)
    x = 0
    for i in range(0,len(files)):
        if os.path.isfile(files[x].split('/')[-1]) == False:
            os.system('wget '+files[x])
        else:
            pass
        x = x + 1
main()
def ext():
    time.sleep(2)
    x = 0
    for i in range(0,2):
 print '\n[!] Installing '+(files[x].split('/')[-1]).split('.tar')[0]+'\n'
 time.sleep(3)
 if 'tar.gz' in files[x]:
            os.system('tar xzvf '+files[x].split('/')[-1])
     os.system('cd '+(files[x].split('/')[-1]).split('.tar')[0]+' && ./configure && make && make install')
 elif 'tar.bz2' in files[x]:
            os.system('tar xvf '+files[x].split('/')[-1])
     os.system('cd '+(files[x].split('/')[-1]).split('.tar')[0]+' && ./configure && make && make install')
 x = x + 1
def install_():
    time.sleep(2)
    x = 2
    for i in range(2,4):
 print '\n[!] Installing '+(files[x].split('/')[-1]).split('.tar')[0]+'\n'
        os.system('tar xzvf '+files[x].split('/')[-1])
        if os.path.isfile(os.getcwd()+'/'+(files[x].split('/')[-1]).split('.tar')[0]+'/'+files[x+2].split('/')[-1]) == False:
     os.system('mv '+files[x+2].split('/')[-1]+' '+(files[x].split('/')[-1]).split('.tar')[0])
        else:
            pass
        os.system('cd '+(files[x].split('/')[-1]).split('.tar')[0]+' && chmod +x '+((files[x].split('/')[-1]).split('.tar')[0]).split('-')[0]+'.SlackBuild && ./'+((files[x].split('/')[-1]).split('.tar')[0]).split('-')[0]+'.SlackBuild')
 os.system('installpkg /tmp/'+(files[x+2].split('/')[-1]).split('.tar')[0]+'-i486-1_SBo.tgz')
        file.write('installpkg /tmp/'+(files[x+2].split('/')[-1]).split('.tar')[0]+'-i486-1_SBo.tgz\n')
        x = x + 1
    print '\n[!] Done!, Gedit telah terinstall\n'
ext()
install_()

About muffat19

you'd never know me
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a comment