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 | |
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
-rw-r--r-- | Build/source/texk/tetex/ChangeLog | 5 | ||||
-rwxr-xr-x | Build/source/texk/tetex/fmtutil | 37 | ||||
-rwxr-xr-x | Master/bin/alpha-linux/fmtutil | 37 | ||||
-rwxr-xr-x | Master/bin/i386-cygwin/fmtutil | 37 | ||||
-rwxr-xr-x | Master/bin/i386-linux/fmtutil | 37 | ||||
-rwxr-xr-x | Master/bin/i386-netbsd/fmtutil | 37 | ||||
-rwxr-xr-x | Master/bin/i386-solaris/fmtutil | 37 | ||||
-rwxr-xr-x | Master/bin/mips-irix/fmtutil | 37 | ||||
-rwxr-xr-x | Master/bin/powerpc-aix/fmtutil | 37 | ||||
-rwxr-xr-x | Master/bin/powerpc-linux/fmtutil | 37 | ||||
-rwxr-xr-x | Master/bin/sparc-linux/fmtutil | 37 | ||||
-rwxr-xr-x | Master/bin/sparc-solaris/fmtutil | 37 | ||||
-rwxr-xr-x | Master/bin/universal-darwin/fmtutil | 37 | ||||
-rwxr-xr-x | Master/bin/x86_64-linux/fmtutil | 37 |
14 files changed, 421 insertions, 65 deletions
diff --git a/Build/source/texk/tetex/ChangeLog b/Build/source/texk/tetex/ChangeLog index 8be01451f07..7888ec22052 100644 --- a/Build/source/texk/tetex/ChangeLog +++ b/Build/source/texk/tetex/ChangeLog @@ -1,3 +1,8 @@ +2009-10-09 Karl Berry <karl@tug.org> + + * fmtutil (run_initex): if it doesn't already exist, create + mplib-luatex.mem when we create mpost.mem. + 2009-08-24 Reinhard Kotucha <reinhard.kotucha@web.de> * updmap.pl (mkMaps): replace dir/ls shell commands by Perl code. diff --git a/Build/source/texk/tetex/fmtutil b/Build/source/texk/tetex/fmtutil index 7297ac69b4b..7b212f0e212 100755 --- a/Build/source/texk/tetex/fmtutil +++ b/Build/source/texk/tetex/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 diff --git a/Master/bin/alpha-linux/fmtutil b/Master/bin/alpha-linux/fmtutil index 7297ac69b4b..7b212f0e212 100755 --- a/Master/bin/alpha-linux/fmtutil +++ b/Master/bin/alpha-linux/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 diff --git a/Master/bin/i386-cygwin/fmtutil b/Master/bin/i386-cygwin/fmtutil index 7297ac69b4b..7b212f0e212 100755 --- a/Master/bin/i386-cygwin/fmtutil +++ b/Master/bin/i386-cygwin/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 diff --git a/Master/bin/i386-linux/fmtutil b/Master/bin/i386-linux/fmtutil index 7297ac69b4b..7b212f0e212 100755 --- a/Master/bin/i386-linux/fmtutil +++ b/Master/bin/i386-linux/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 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 diff --git a/Master/bin/i386-solaris/fmtutil b/Master/bin/i386-solaris/fmtutil index 7297ac69b4b..7b212f0e212 100755 --- a/Master/bin/i386-solaris/fmtutil +++ b/Master/bin/i386-solaris/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 diff --git a/Master/bin/mips-irix/fmtutil b/Master/bin/mips-irix/fmtutil index 7297ac69b4b..7b212f0e212 100755 --- a/Master/bin/mips-irix/fmtutil +++ b/Master/bin/mips-irix/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 diff --git a/Master/bin/powerpc-aix/fmtutil b/Master/bin/powerpc-aix/fmtutil index 7297ac69b4b..7b212f0e212 100755 --- a/Master/bin/powerpc-aix/fmtutil +++ b/Master/bin/powerpc-aix/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 diff --git a/Master/bin/powerpc-linux/fmtutil b/Master/bin/powerpc-linux/fmtutil index 7297ac69b4b..7b212f0e212 100755 --- a/Master/bin/powerpc-linux/fmtutil +++ b/Master/bin/powerpc-linux/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 diff --git a/Master/bin/sparc-linux/fmtutil b/Master/bin/sparc-linux/fmtutil index 7297ac69b4b..7b212f0e212 100755 --- a/Master/bin/sparc-linux/fmtutil +++ b/Master/bin/sparc-linux/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 diff --git a/Master/bin/sparc-solaris/fmtutil b/Master/bin/sparc-solaris/fmtutil index 7297ac69b4b..7b212f0e212 100755 --- a/Master/bin/sparc-solaris/fmtutil +++ b/Master/bin/sparc-solaris/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 diff --git a/Master/bin/universal-darwin/fmtutil b/Master/bin/universal-darwin/fmtutil index 7297ac69b4b..7b212f0e212 100755 --- a/Master/bin/universal-darwin/fmtutil +++ b/Master/bin/universal-darwin/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 diff --git a/Master/bin/x86_64-linux/fmtutil b/Master/bin/x86_64-linux/fmtutil index 7297ac69b4b..7b212f0e212 100755 --- a/Master/bin/x86_64-linux/fmtutil +++ b/Master/bin/x86_64-linux/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 |