#!/usr/bin/python
import os
yes = "y"
no = "n"
bin = "#!/bin/bash \ncd /usr/local/share/spop_note/\npython spop_note.py"
files1 = " CHANGELOG commands.py file_check.py LICENCE README spop_note.py TODO uninstall.py "
files2 = " icons/about.png icons/new_file.png icons/open_file.png icons/quit.png icons/save_file.png "
files3 = " text/abouttext text/developers text/version "
path1 = " /usr/local/share/spop_note"
path2 = " /usr/local/share/spop_note/icons"
path3 = " /usr/local/share/spop_note/text"
print "This Install Script is very experimental. So be careful. \nThere is no warranty that everything works. \nFirst of all read the README file!!!\n"
def installation():
os.system("sudo mkdir "+path1)
os.system("sudo mkdir "+path2)
os.system("sudo mkdir "+path3)
os.system("sudo cp -v -R"+files1+path1)
os.system("sudo cp -v -R"+files2+path2)
os.system("sudo cp -v -R"+files3+path3)
os.system("sudo touch /usr/local/bin/spop_note")
os.system("sudo chmod a+xwr /usr/local/bin/spop_note")
bin_file = open("/usr/local/bin/spop_note", "w")
bin_file = bin_file.write(bin)
print "Installation complete!!!"
def sure():
first_answer = raw_input("Do you really want to install sPOP Note? y/n ")
if first_answer == no:
print "stop the installation"
if first_answer == yes:
print "Continue the installation"
installation()
sure()