[go: up one dir, main page]

Menu

[r20]: / note / trunk / install.py  Maximize  Restore  History

Download this file

45 lines (32 with data), 1.4 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/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()