texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

texinfo ChangeLog util/texi2dvi


From: Akim Demaille
Subject: texinfo ChangeLog util/texi2dvi
Date: Wed, 15 Apr 2009 14:55:50 +0000

CVSROOT:        /cvsroot/texinfo
Module name:    texinfo
Changes by:     Akim Demaille <akim>    09/04/15 14:55:50

Modified files:
        .              : ChangeLog 
        util           : texi2dvi 

Log message:
        texi2dvi: simplify move_to_dest.
        * bin/texi2dvi (move_to_dest): Exit immediately if there is
        nothing to do.
        This allows to simplify the body of the loop, as we no longer have
        to check whether something has to be done.
        Don't build-and-then-split $dest, just build the split components.
        $dest is no longer needed.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/ChangeLog?cvsroot=texinfo&r1=1.1001&r2=1.1002
http://cvs.savannah.gnu.org/viewcvs/texinfo/util/texi2dvi?cvsroot=texinfo&r1=1.146&r2=1.147

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/texinfo/texinfo/ChangeLog,v
retrieving revision 1.1001
retrieving revision 1.1002
diff -u -b -r1.1001 -r1.1002
--- ChangeLog   15 Apr 2009 14:50:13 -0000      1.1001
+++ ChangeLog   15 Apr 2009 14:55:49 -0000      1.1002
@@ -1,5 +1,21 @@
 2009-04-15  Akim Demaille  <address@hidden>
 
+       texi2dvi: simplify move_to_dest.
+       * bin/texi2dvi (move_to_dest): Exit immediately if there is
+       nothing to do.
+       This allows to simplify the body of the loop, as we no longer have
+       to check whether something has to be done.
+       Don't build-and-then-split $dest, just build the split components.
+       $dest is no longer needed.
+
+2009-04-15  Akim Demaille  <address@hidden>
+
+       texi2dvi: avoid creating invisible temporary files.
+       * bin/texi2dvi ($t2ddir): Strip leading `./'.
+       Call sed once.
+
+2009-04-15  Akim Demaille  <address@hidden>
+
        texi2dvi: complete --help.
        * bin/texi2dvi (usage): Document --html.
 

Index: util/texi2dvi
===================================================================
RCS file: /cvsroot/texinfo/texinfo/util/texi2dvi,v
retrieving revision 1.146
retrieving revision 1.147
diff -u -b -r1.146 -r1.147
--- util/texi2dvi       15 Apr 2009 14:50:14 -0000      1.146
+++ util/texi2dvi       15 Apr 2009 14:55:50 -0000      1.147
@@ -1,6 +1,6 @@
 #! /bin/sh
 # texi2dvi --- produce DVI (or PDF) files from Texinfo (or (La)TeX) sources.
-# $Id: texi2dvi,v 1.146 2009/04/15 14:50:14 akim Exp $
+# $Id: texi2dvi,v 1.147 2009/04/15 14:55:50 akim Exp $
 #
 # Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003,
 # 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
@@ -33,7 +33,7 @@
 set -e
 
 # This string is expanded automatically when this file is checked out.
-rcs_revision='$Revision: 1.146 $'
+rcs_revision='$Revision: 1.147 $'
 rcs_version=`set - $rcs_revision; echo $2`
 program=`echo $0 | sed -e 's!.*/!!'`
 
@@ -648,7 +648,11 @@
 # an auxiliary file with the same base name.
 move_to_dest ()
 {
-  local dest
+  # If we built in place, there is nothing to install, leave.
+  case $tidy:$oname in
+    false:) return;;
+  esac
+
   local destfile
   local destdir
   local destbase
@@ -657,23 +661,14 @@
 
   for file
   do
+    test -f "$file" ||
+      error 1 "no such file or directory: $file"
     case $tidy:$oname in
-      true:)  dest=$orig_pwd;;
-      false:) dest=;;
-      *:*)    dest=`output_base_name "$file"`;;
+      true:)  destdir=$orig_pwd
+              destfile=$destdir/$file;;
+      *:*)    destfile=`output_base_name "$file"`
+              destdir=`dirname "$destfile"`;;
     esac
-    if test ! -f "$file"; then
-      error 1 "no such file or directory: $file"
-    fi
-    if test -n "$dest"; then
-      # We need to know whether $dest is a directory.
-      if test -d "$dest"; then
-        destdir=$dest
-        destfile=$dest/$file
-      else
-        destdir=`dirname "$dest"`
-        destfile=$dest
-      fi
       # We want to compare the source location and the output location,
       # and if they are different, do the move.  But if they are the
       # same, we must preserve the source.  Since we can't assume
@@ -683,17 +678,16 @@
       # e.g., TeX DVI output is timestamped to only the nearest minute.
       destdir=`cd "$destdir" && pwd`
       destbase=`basename "$destfile"`
-      #
+
       sourcedir=`dirname "$file"`
       sourcedir=`cd "$sourcedir" && pwd`
       sourcebase=`basename "$file"`
-      #
+
       if test "$sourcedir/$sourcebase" != "$destdir/$destbase"; then
         verbose "Moving $file to $destfile"
         rm -f "$destfile"
         mv "$file" "$destfile"
       fi
-    fi
   done
 }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]