home *** CD-ROM | disk | FTP | other *** search
- #!/usr/bin/perl -w
-
- use Debian::DictionariesCommon q(:all);
- use Debconf::Client::ConfModule q(:all);
- use Getopt::Long;
-
- die "$0: Sorry, you must be root to run this.\n"
- if ($< != 0);
-
- my $rebuild = '';
-
- GetOptions ('rebuild' => \$rebuild);
-
- version ('2.0');
-
- my $question = "dictionaries-common/default-ispell";
- my $class = "ispell";
- my $options = "";
-
- $options = "--rebuild" if $rebuild;
-
- updatedb ($class);
- my $dictionaries = loaddb ($class);
-
- unless ( scalar (keys %{$dictionaries}) == 0 ) {
- if (get $question) {
- fset ($question, "seen", "false");
- input ("critical", "$question");
- title ("Dictionaries-common: Ispell dictionary");
- go ();
- }
- }
-
- system "update-default-$class $options";
-
- #Local Variables:
- #perl-indent-level: 2
- #End:
-
- __END__
-
- =head1 NAME
-
- select-default-ispell - select default ispell dictionary
-
- =head1 SYNOPSIS
-
- select-default-ispell [--rebuild]
-
- =head1 DESCRIPTION
-
- This program will make debconf always ask the shared question about
- the default ispell dictionary to be used in your
- system according to the installed ones, and will do the appropriate
- settings.
-
- Calls internally B<update-default-ispell>.
-
-
- =head1 OPTIONS
-
- --rebuild Rebuild emacsen and jed stuff
-
- =head1 SEE ALSO
-
- The dictionaries-common policy document
-
- =head1 AUTHORS
-
- Rafael Laboissiere
-
- =cut
-
-
-
- # LocalWords: ispell wordlist
-