2
# IVLE - Informatics Virtual Learning Environment
3
# Copyright (C) 2007-2008 The University of Melbourne
5
# This program is free software; you can redistribute it and/or modify
6
# it under the terms of the GNU General Public License as published by
7
# the Free Software Foundation; either version 2 of the License, or
8
# (at your option) any later version.
10
# This program is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
# GNU General Public License for more details.
15
# You should have received a copy of the GNU General Public License
16
# along with this program; if not, write to the Free Software
17
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23
# This is a command-line application, for use by the administrator.
24
# This program is a frontend for the modules in the setup packages that
25
# configure, build and install IVLE in three separate steps.
26
# It is called with at least one argument, which specifies which operation to
30
import setup.configure
40
# Print the opening spiel including the GPL notice
42
print """IVLE - Informatics Virtual Learning Environment Setup
43
Copyright (C) 2007-2008 The University of Melbourne
44
IVLE comes with ABSOLUTELY NO WARRANTY.
45
This is free software, and you are welcome to redistribute it
46
under certain conditions. See LICENSE.txt for details.
51
# First argument is the name of the setup operation
55
# Print usage message and exit
59
oper_func = call_operator(operation)
60
return oper_func(argv[2:])
64
print """Usage: python setup.py operation [options]
65
Operation (and options) can be:
67
listmake (developer use only)
70
install [--nojail] [--nosubjects] [-n|--dry]
72
For help on a specific operation use 'help [operation]'."""
75
oper_func = call_operator(operator)
76
oper_func(['operator','--help'])
78
def call_operator(operation):
79
# Call the requested operation's function
83
'config' : setup.configure.configure,
84
'build' : setup.build.build,
85
'listmake' : setup.listmake.listmake,
86
'install' : setup.install.install,
87
#'updatejails' : None,
91
"""Invalid operation '%s'. Try python setup.py help."""
96
if __name__ == "__main__":