);
use Getopt::Long;
use utf8;
+use Fcntl ':flock';
use Chise_utils ':all';
-my $perl="/usr/bin/perl";
-my $makefonts="/Users/izumi/.chise/makefonts.pl";
+my $omegadb_path="/usr/local/lib/chise/omega";
+$omegadb_path=~s!/$!!;
+
+my $makefonts="$omegadb_path/makefonts.pl";
my $exec_makefonts=0;
my $geta=pack("S",8750|0x8080);
$texmacro[0x1E5D]='{\ifmmode \ucirc{\bar{r}}\else \ucirc{\={r}}\fi}';
}
-$idsdata_file="idsdata.pl";
+$idsdata_file="$omegadb_path/idsdata.pl";
$ids_start=0x00;
$font_start=0;
if(-e $idsdata_file){
- require $idsdata_file;
+ open(IDSDATA,"+<$idsdata_file") or die;
+ flock(IDSDATA,LOCK_EX);
+ seek(IDSDATA,0,0);
+ while(<IDSDATA>){
+ eval $_;
+ }
+ seek(IDSDATA,0,0);
+# require $idsdata_file;
+}else{
+ open(IDSDATA,">$idsdata_file") or die;
+ flock(IDSDATA,LOCK_EX);
+ seek(IDSDATA,0,0);
}
$ids_argc=0;
}
}
-open(IDSDATA,">$idsdata_file") or die;
print IDSDATA 'use utf8;',"\n";
foreach $ids (keys %ids){
print IDSDATA '$ids{\'',$ids,'\'}='
if($exec_makefonts){
if(-f $makefonts){
- system($perl,$makefonts) ==0
+ system("/usr/bin/env","perl",$makefonts) ==0
or die "Could not make fonts: $?";
}else{
print STDERR "cannot find $makefonts\n";