File: configure

package info (click to toggle)
ajaxterm 0.10-12
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 844 kB
  • ctags: 1,787
  • sloc: python: 10,425; sh: 96; makefile: 51
file content (24 lines) | stat: -rwxr-xr-x 986 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env python

import optparse,os

parser = optparse.OptionParser()
parser.add_option("", "--prefix", dest="prefix",default="/usr/local",help="installation prefix (default: /usr/local)")
parser.add_option("", "--confdir", dest="confdir", default="/etc",help="configuration files directory prefix (default: /etc)")
parser.add_option("", "--port", dest="port", default="8022", help="set the listening TCP port (default: 8022)")
parser.add_option("", "--command", dest="cmd", default=None,help="set the command (default: /bin/login or ssh localhost)")
(o, a) = parser.parse_args()

print "Configuring prefix=",o.prefix," port=",o.port

etc=o.confdir
port=o.port
cmd=o.cmd
bin=os.path.join(o.prefix,"bin")
lib=os.path.join(o.prefix,"share/ajaxterm")
man=os.path.join(o.prefix,"share/man/man1")

file("ajaxterm.bin","w").write(file("configure.ajaxterm.bin").read()%locals())
file("Makefile","w").write(file("configure.makefile").read()%locals())

os.system("chmod a+x ajaxterm.bin")