/[glsr]/trunk/harmonious-install.py
Gentoo

Contents of /trunk/harmonious-install.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 46 - (show annotations) (download) (as text)
Fri Jul 1 18:26:35 2005 UTC (8 years, 9 months ago) by port001
File MIME type: text/x-python
File size: 1215 byte(s)
Simple install tool
1 #!/usr/bin/python
2
3 import os
4 import sys
5
6 SVN_REPO = '/home/port001/Gentoo/glsr/trunk/'
7 SITE_PACKAGES = '/usr/lib/python2.4/site-packages/'
8 USR_BIN= '/usr/bin/'
9 ETC = '/etc/'
10
11 print "Installing Harmonious Web Framework..."
12 print
13
14 os.chdir(SVN_REPO)
15
16 print "Backing up..."
17
18 if os.path.exists(os.path.join(SITE_PACKAGES, 'harmonious')):
19 os.system("rm -rf %s" % os.path.join(SITE_PACKAGES, 'harmonious-old'))
20 os.system("mv %s %s" % (os.path.join(SITE_PACKAGES, 'harmonious'), os.path.join(SITE_PACKAGES, 'harmonious-old')))
21
22 if os.path.exists(os.path.join(ETC, 'harmonious.conf')):
23 os.system("rm -rf %s" % os.path.join(ETC, 'harmonious.conf-old'))
24 os.system("mv %s %s" % (os.path.join(ETC, 'harmonious.conf'), os.path.join(ETC, 'harmonious.conf-old')))
25
26 print "Installing python modules..."
27
28 os.mkdir(os.path.join(SITE_PACKAGES, 'harmonious'))
29 os.system("cp -R harmonious/* %s" % os.path.join(SITE_PACKAGES, 'harmonious'))
30
31 print "Installing server..."
32
33 os.system("mv %s/server/server.py %s" % (os.path.join(SITE_PACKAGES, 'harmonious'), USR_BIN))
34
35 print "Installing configuration..."
36
37 os.system("mv %s/server/harmonious.conf %s" % (os.path.join(SITE_PACKAGES, 'harmonious'), ETC))
38
39 print
40 print "Done."

  ViewVC Help
Powered by ViewVC 1.1.20