diff options
author | Karl Berry <karl@freefriends.org> | 2009-10-09 00:24:54 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-10-09 00:24:54 +0000 |
commit | bd5d5cf20eca1b7563a35e629e448be5f6008682 (patch) | |
tree | 8f183fdcba09c34be2c02234a8b6a0df401d2c37 /Master/bin/i386-netbsd | |
parent | 2dc8fe979a231549da575be28ef3905cadae45e7 (diff) |
create mplib-luatex.mem if it does not already exist (for use by the luamplib package)
git-svn-id: svn://tug.org/texlive/trunk@15707 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/bin/i386-netbsd')
-rwxr-xr-x | Master/bin/i386-netbsd/fmtutil | 37 |
1 files changed, 32 insertions, 5 deletions
diff --git a/Master/bin/i386-netbsd/fmtutil b/Master/bin/i386-netbsd/fmtutil index 7297ac69b4b..7b212f0e212 100755 --- a/Master/bin/i386-netbsd/fmtutil +++ b/Master/bin/i386-netbsd/fmtutil @@ -58,7 +58,7 @@ test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"' progname=fmtutil argv0=$0 -version=20090815.0056 +version=20091009.0222 cnf=fmtutil.cnf # name of the config file export PATH @@ -736,17 +736,44 @@ run_initex() fulldestdir="$destdir" fi mkdir -p "$fulldestdir" - if test -f $fmtfile; then + if test -f "$fmtfile"; then grep '^! ' $format.log >/dev/null 2>&1 && log_warning "\`$engine -ini $tcxflag $jobswitch $prgswitch $texargs' possibly failed." # We don't want user-interaction for the following "mv" commands: mv "$format.log" "$fulldestdir/$format.log" </dev/null - if mv "$fmtfile" "$fulldestdir/$fmtfile" </dev/null; then - verboseMsg "$progname: $fulldestdir/$fmtfile installed." + # + destfile=$fulldestdir/$fmtfile + if mv "$fmtfile" "$destfile" </dev/null; then + verboseMsg "$progname: $destfile installed." # + # As a special special case, we create mplib-luatex.mem for use by + # the mplib embedded in luatex if it doesn't already exist. (We + # never update it if it does exist.) + # + # This is used by the luamplib package. This way, an expert user + # who wants to try a new version of luatex (hence with a new + # version of mplib) can manually update mplib-luatex.mem without + # having to tamper with mpost itself. + # + if test "x$format" = xmpost && test "x$engine" = xmpost; then + mplib_mem_name=mplib-luatex.mem + mplib_mem_file=$fulldestdir/$mplib_mem_name + if test \! -f $mplib_mem_file; then + verboseMsg "$progname: copying $destfile to $mplib_mem_file" + if cp "$destfile" "$mplib_mem_file" </dev/null; then + mktexupd "$fulldestdir" "$mplib_mem_name" + else + log_warning "cp $destfile $mplib_mem_file failed." + fi + else + verboseMsg "$progname: $mplib_mem_file already exists, not updating." + fi + fi + # + # Echo the (main) output filename for our caller. $mktexfmtMode && $mktexfmtFirst \ - && echo "$fulldestdir/$fmtfile" && mktexfmtFirst=false + && echo "$destfile" && mktexfmtFirst=false # mktexupd "$fulldestdir" "$fmtfile" fi |