lilypond-1.1.44
[lilypond.git] / buildscripts / template.py
blobf1a45e05098a4d3b3ac2c52d9f4ffa58737006d9
1 #!@PYTHON@
3 # template.py --
4 #
5 # source file of the GNU LilyPond music typesetter
6 #
7 # (c) 1998
9 program_name = 'template'
10 version = '0.1'
12 import os
13 import sys
15 sys.path.append ('@abs-step-bindir@')
16 sys.path.append (os.environ['HOME'] + '/usr/src/lilypond/stepmake/bin')
18 import getopt
19 from string import *
20 import regex
21 import regsub
22 import time
24 def program_id ():
25 return name + ' version ' + version;
27 def identify ():
28 sys.stdout.write (program_id () + '\n')
30 def help ():
31 sys.stdout.write ("Usage: %s [options] [files]\n"
32 "I'm not a program, use me as a template to create one\n\n"
33 + "Options:\n"
34 + " -h, --help print this help\n"
35 % (program_name)
37 sys.exit (0)
39 identify ()
40 (options, files) = getopt.getopt (
41 sys.argv[1:], 'hp:', ['help', 'package'])
42 for opt in options:
43 o = opt[0]
44 a = opt[1]
45 if o== '--help' or o == '-h':
46 help ()
47 elif o == '-p' or o == '--package':
48 topdir = a
49 else:
50 print o
51 raise getopt.error
53 sys.path.append (topdir + '/stepmake/bin')
54 from packagepython import *
55 package = Package (topdir)
56 packager = Packager ()
58 from flower import *