1998-11-02 20:04:30 +00:00
|
|
|
--- confarc.orig Mon Jul 27 21:30:54 1998
|
1998-11-04 04:42:05 +00:00
|
|
|
+++ confarc Wed Nov 4 07:35:46 1998
|
1998-11-02 20:04:30 +00:00
|
|
|
@@ -75,6 +75,8 @@
|
|
|
|
elsif (/^-l/) { $nu_list = &get_option("-list"); }
|
|
|
|
elsif (/^-T/) { $nu_title = &get_option("-Title"); }
|
|
|
|
elsif (/^-b/) { $nu_addboxes = 1; }
|
|
|
|
+ elsif (/^-L/) { $nu_locale = &get_option("-Locale"); }
|
|
|
|
+ elsif (/^-C/) { $nu_charset = &get_option("-Charset"); }
|
|
|
|
elsif (/^-[\?hH]/) { &usage; }
|
|
|
|
else { &usage("unknown argument: $_"); }
|
|
|
|
}
|
|
|
|
@@ -142,6 +144,8 @@
|
|
|
|
$addboxes = 0;
|
|
|
|
$usemaxmem = 0;
|
|
|
|
$vhost = "";
|
|
|
|
+$locale = '';
|
|
|
|
+$charset = '';
|
|
|
|
@urllist = ();
|
|
|
|
|
|
|
|
# pre-set localscope
|
|
|
|
@@ -219,7 +223,7 @@
|
|
|
|
print "\nFound archive. Reading in previous settings for update.\n";
|
|
|
|
|
|
|
|
($title, $urlpath, $traverse_type, $explicit_only, $numhops,
|
|
|
|
- $nhhops, $local_limit, $remote_limit, $addboxes, $vhost, $usemaxmem, @urllist) = ReadConfig($indexdir);
|
|
|
|
+ $nhhops, $local_limit, $remote_limit, $addboxes, $vhost, $usemaxmem, $locale, $charset, @urllist) = ReadConfig($indexdir);
|
|
|
|
}
|
|
|
|
|
|
|
|
# If we had a virtual host on the command line, revert to that.
|
1998-11-04 04:17:03 +00:00
|
|
|
@@ -423,6 +427,35 @@
|
1998-11-02 20:04:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
+if ($nu_locale) {
|
1998-11-04 04:17:03 +00:00
|
|
|
+ $locale = $nu_locale;
|
|
|
|
+} else {
|
|
|
|
+ if ($locale eq '') {
|
|
|
|
+ $locale = $ENV{LANG} if defined($ENV{LANG});
|
|
|
|
+ $locale = $ENV{LC_ALL} if defined($ENV{LC_ALL});
|
|
|
|
+ $locale = $ENV{LC_CTYPE} if defined($ENV{LC_CTYPE});
|
|
|
|
+ }
|
|
|
|
+ if (! $nu_quiet) {
|
1998-11-02 20:04:30 +00:00
|
|
|
+ $oldlocale=$locale;
|
|
|
|
+
|
|
|
|
+ $locale = &prompt("System locale (press return to leave it as is or * to cancel old one)\n",$oldlocale);
|
|
|
|
+ $locale = '' if ($locale eq "*");
|
1998-11-04 04:17:03 +00:00
|
|
|
+ }
|
1998-11-02 20:04:30 +00:00
|
|
|
+}
|
|
|
|
+
|
|
|
|
+if ($nu_charset) {
|
1998-11-04 04:17:03 +00:00
|
|
|
+ $charset = $nu_charset;
|
|
|
|
+} else {
|
|
|
|
+ if ($charset eq '') {
|
|
|
|
+ $charset = $ENV{MM_CHARSET} if defined($ENV{MM_CHARSET});
|
|
|
|
+ }
|
|
|
|
+ if (! $nu_quiet) {
|
1998-11-02 20:04:30 +00:00
|
|
|
+ $oldcharset=$charset;
|
|
|
|
+
|
|
|
|
+ $charset = &prompt("Charset for CGI (press return to leave it as is or * to cancel old one)\n",$oldcharset);
|
|
|
|
+ $charset = '' if ($charset eq "*");
|
1998-11-04 04:17:03 +00:00
|
|
|
+ }
|
1998-11-02 20:04:30 +00:00
|
|
|
+}
|
|
|
|
|
|
|
|
# generate the comment
|
|
|
|
if ($found_archive) {
|
1998-11-04 04:17:03 +00:00
|
|
|
@@ -452,6 +485,8 @@
|
1998-11-02 20:04:30 +00:00
|
|
|
# vhost Hostname = name of virtual host to use for this index
|
|
|
|
# usemaxmem 0 = 0 to NOT use maximum available memory
|
|
|
|
# = 1 to use maximum memory to speed up indexing
|
|
|
|
+# locale LOCALE = system locale or empty
|
|
|
|
+# charset CHARSET = character set for CGI output or empty
|
|
|
|
# urllist Url1,Url2,.. = List of starting URL's or Directories to index
|
|
|
|
# ";
|
|
|
|
}
|
1998-11-04 04:17:03 +00:00
|
|
|
@@ -473,7 +508,7 @@
|
1998-11-02 20:04:30 +00:00
|
|
|
# save the configuration
|
|
|
|
if(&SaveConfig($indexdir, $topcomment,
|
|
|
|
$title,$url,$traverse_type,$explicit_only,$numhops,$nhhops,
|
|
|
|
- $local_limit, $remote_limit, $addboxes, $vhost, $usemaxmem, @urllist) == 0){
|
|
|
|
+ $local_limit, $remote_limit, $addboxes, $vhost, $usemaxmem, $locale, $charset, @urllist) == 0){
|
|
|
|
print "Error saving configuration to file!\n";
|
|
|
|
exit 3;
|
|
|
|
}
|
1998-11-04 04:17:03 +00:00
|
|
|
@@ -483,7 +518,7 @@
|
1998-11-02 20:04:30 +00:00
|
|
|
©_files($indexdir);
|
|
|
|
|
|
|
|
# construct the cron file
|
|
|
|
-if (system("$MAKECRON $indexdir $usemaxmem") < 0) {
|
|
|
|
+if (system("$MAKECRON $indexdir $usemaxmem $locale") < 0) {
|
|
|
|
print "ERROR: Unable to create cronfile $mycronfile\n";
|
|
|
|
exit 6;
|
|
|
|
}
|
1998-11-04 04:42:05 +00:00
|
|
|
@@ -617,8 +652,10 @@
|
|
|
|
if ($ttype == 2) { # Subdirectory-based index
|
|
|
|
print "\n\nNow you will need to enter the full path to the directory(s)\n";
|
|
|
|
print "to be indexed. It must be accessible from the web.\n";
|
|
|
|
+ print "Alternatively you can enter the URL(s) of the directories you would\n";
|
|
|
|
+ print "like to index.\n";
|
|
|
|
|
|
|
|
- $entry = &prompt("Directory Path: ", $indexdir);
|
|
|
|
+ $entry = &prompt("Directory Path or URL: ", $indexdir);
|
|
|
|
|
|
|
|
} else { # Traversal-based index
|
|
|
|
|