| 1 | #!/usr/local/bin/perl |
1 | #!/usr/bin/env perl |
| 2 | |
2 | |
| 3 | ################################################################################ |
3 | ################################################################################ |
| 4 | # WeBWorK |
4 | # WeBWorK |
| 5 | # |
5 | # |
| 6 | # Copyright (c) 1995-2001 WeBWorK Team, University of Rochester |
6 | # Copyright (c) 1995-2001 WeBWorK Team, University of Rochester |
| … | |
… | |
| 14 | require 5.000; |
14 | require 5.000; |
| 15 | use Cwd; |
15 | use Cwd; |
| 16 | use File::Copy; |
16 | use File::Copy; |
| 17 | |
17 | |
| 18 | # define built-in defaults |
18 | # define built-in defaults |
| 19 | my $DEFAULT_PERL_PATH = '/usr/bin/perl'; |
19 | my $DEFAULT_PERL_PATH = '/usr/bin/env perl'; |
| 20 | my $DEFAULT_CGI_URL = '/cgi-bin/webwork/system/'; |
20 | my $DEFAULT_CGI_URL = '/cgi-bin/webwork/system/'; |
| 21 | my $DEFAULT_HTML_URL = '/webwork_system_html/'; |
21 | my $DEFAULT_HTML_URL = '/webwork_system_html/'; |
| 22 | my $DEFAULT_ADMIN_GROUP = 'wwadmin'; |
22 | my $DEFAULT_ADMIN_GROUP = 'wwadmin'; |
| 23 | |
23 | |
| 24 | # define code strings |
24 | # define code strings |
| … | |
… | |
| 114 | |
114 | |
| 115 | WeBWorK needs to know the path of your perl binary, so that this |
115 | WeBWorK needs to know the path of your perl binary, so that this |
| 116 | information can be used in the headers of cgi scripts. Please make sure |
116 | information can be used in the headers of cgi scripts. Please make sure |
| 117 | that the version of perl you specify is 5.004 or later. |
117 | that the version of perl you specify is 5.004 or later. |
| 118 | |
118 | |
|
|
119 | If you have commit access to the WeBWorK system repository, you MUST |
|
|
120 | leave this as "/usr/bin/env perl". |
|
|
121 | |
| 119 | }; |
122 | }; |
| 120 | |
123 | |
| 121 | my $CGI_URL_TEXT = q{ |
124 | my $CGI_URL_TEXT = q{ |
| 122 | |
125 | |
| 123 | In order for generated HTML to be able to invoke CGI scripts, WeBWorK |
126 | In order for generated HTML to be able to invoke CGI scripts, WeBWorK |
| … | |
… | |
| 265 | |
268 | |
| 266 | #################### system HTML directory |
269 | #################### system HTML directory |
| 267 | |
270 | |
| 268 | unless(defined $htmlDir) { |
271 | unless(defined $htmlDir) { |
| 269 | page($HTML_DIR_TEXT); |
272 | page($HTML_DIR_TEXT); |
|
|
273 | my $htmlDirGuess = ${mainDir}; |
|
|
274 | $htmlDirGuess =~ s|[^/]+/$|system_html/|; |
| 270 | $htmlDir = questionString("Where is the WeBWorK system HTML directory?", "${mainDir}../system_html/"); |
275 | $htmlDir = questionString("Where is the WeBWorK system HTML directory?", $htmlDirGuess); |
| 271 | $htmlDir .= '/' unless $htmlDir =~ m|/$|; # ensure trailing slash |
276 | $htmlDir .= '/' unless $htmlDir =~ m|/$|; # ensure trailing slash |
| 272 | } |
277 | } |
| 273 | print "We'll use $htmlDir as WeBWorK's system HTML directory.\n"; |
278 | print "We'll use $htmlDir as WeBWorK's system HTML directory.\n"; |
| 274 | |
279 | |
| 275 | #################### HTML URL |
280 | #################### HTML URL |