use $omegadb_path of Chise_utils.pm.
authorimiyazaki <imiyazaki>
Thu, 27 Nov 2003 13:44:43 +0000 (13:44 +0000)
committerimiyazaki <imiyazaki>
Thu, 27 Nov 2003 13:44:43 +0000 (13:44 +0000)
change location of cleanup script (svg2t1.pfe).

makefonts.pl

index ebb7dc3..e1928a9 100755 (executable)
@@ -6,10 +6,9 @@ use strict;
 use utf8;
 use IO::Socket::INET;
 use BerkeleyDB;
+use Chise_utils '$omegadb_path';
 require 5.008001;
 
-my $omegadb_path="/usr/local/lib/chise/omega"; # set to the path of your db and script.
-
 #my $kageaddr="home.fonts.jp:5100"; # Specify port number!
 my $kageaddr="home.fonts.jp:5101"; # Specify port number!
 #my $kagecgi="/~kamichi/test/kagecgi.cgi"; #
@@ -21,7 +20,23 @@ my $pfaedit="/usr/bin/env pfaedit"; # point to 'pfaedit' executable.
 
 $omegadb_path=~s!/$!!;
 
-my $cleanup_script="$omegadb_path/svg2t1.pfe"; # Check the path of pfaedit script.
+my $cleanup_script=""; # Check the path of pfaedit script, if needed.
+
+unless($cleanup_script){
+    if(-e "/usr/local/share/texmf/omega/ocp/local/chise/svg2t1.pfe"){
+       $cleanup_script="/usr/local/share/texmf/omega/ocp/local/chise/svg2t1.pfe";
+    }elsif(-e "/usr/share/texmf/omega/ocp/local/chise/svg2t1.pfe"){
+       $cleanup_script="/usr/share/texmf/omega/ocp/local/chise/svg2t1.pfe";
+    }elsif(-e "/sw/share/texmf/omega/ocp/local/chise/svg2t1.pfe"){
+       $cleanup_script="/sw/share/texmf/omega/ocp/local/chise/svg2t1.pfe";
+    }
+}
+unless($cleanup_script and -e $cleanup_script){
+    print STDERR "svg2t1.pfe not found!\n",
+    "please check \$cleanup_script in $0.\n";
+    exit 1;
+}
+
 my $dbpath="$omegadb_path/glyph.db"; # check your DB path.
 
 # Open Glyph Database