source: trunk/gsdl/bin/script/makemapfile.pl@ 1868

Last change on this file since 1868 was 1868, checked in by sjboddie, 23 years ago

Made a bunch of changes to the building code to support lots of new
languages and encodings. It's still kind of a mess but should be fixed
up over the weekend.

  • Property svn:keywords set to Author Date Id Revision
File size: 1.9 KB
Line 
1#!/usr/bin/perl -w
2
3###########################################################################
4#
5# makemapfile.pl --
6# A component of the Greenstone digital library software
7# from the New Zealand Digital Library Project at the
8# University of Waikato, New Zealand.
9#
10# Copyright (C) 2001 New Zealand Digital Library Project
11#
12# This program is free software; you can redistribute it and/or modify
13# it under the terms of the GNU General Public License as published by
14# the Free Software Foundation; either version 2 of the License, or
15# (at your option) any later version.
16#
17# This program is distributed in the hope that it will be useful,
18# but WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20# GNU General Public License for more details.
21#
22# You should have received a copy of the GNU General Public License
23# along with this program; if not, write to the Free Software
24# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25#
26###########################################################################
27
28# Creates a binary map file for use by complex character encodings
29# (e.g. CJK encodings like GBK and Shift-JIS). The map file is written to
30# the $GSDLHOME/unicode directory.
31
32BEGIN {
33 die "GSDLHOME not set\n" unless defined $ENV{'GSDLHOME'};
34 die "GSDLOS not set\n" unless defined $ENV{'GSDLOS'};
35 unshift (@INC, "$ENV{'GSDLHOME'}/perllib");
36}
37
38use parsargv;
39use cjk;
40&main();
41
42sub print_usage {
43 print STDERR "\n usage: $0 [options]\n\n";
44 print STDERR " options:\n";
45 print STDERR " -encoding name\n";
46 print STDERR " -mapfile text file from which to create binary\n\n";
47}
48
49sub main {
50 if (!parsargv::parse(\@ARGV,
51 'encoding/.+', \$encoding,
52 'mapfile/.+', \$mapfile)) {
53 &print_usage();
54 die "\n";
55 }
56
57 &cjk::makeencodingmapfile ($encoding, $mapfile);
58}
Note: See TracBrowser for help on using the repository browser.