bug-tar
[Top][All Lists]
Advanced

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

[Bug-tar] bootstrap improvement to avoid the need to create modlist.tmp


From: Paul Eggert
Subject: [Bug-tar] bootstrap improvement to avoid the need to create modlist.tmp
Date: Mon, 18 Apr 2005 11:16:22 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux)

When bootstrapping GNU tar I noticed a junk file modlist.tmp left behind.
I installed this:

2005-04-18  Paul Eggert  <address@hidden>

        * bootstrap (gnulib_modules): Don't create a file modlist.tmp, as
        it is sometimes left behind as a garbage file (maybe due to the
        multiple traps?).

--- bootstrap   21 Mar 2005 21:56:02 -0000      1.30
+++ bootstrap   18 Apr 2005 18:14:58 -0000      1.31
@@ -162,12 +162,16 @@ checkout() {
   fi
 }
 
-# Prepare temporary module list
-cat /dev/null > modlist.tmp
-trap 'rm -f modlist.tmp' 0 1 2 13 15
+gnulib_modules=
+newline='
+'
 
 get_modules() {
-       sed '/^[        ]*#/d;/^[       ]*$/d' $* >> modlist.tmp
+  new_gnulib_modules=`sed '/^[  ]*#/d; /^[      ]*$/d' $*`
+  case $gnulib_modules,$new_gnulib_modules in
+  ?*,?*) new_gnulib_modules=$newline$new_gnulib_modules;;
+  esac
+  gnulib_modules=$gnulib_modules$new_gnulib_modules
 }
 
 # Get paxutils files
@@ -223,7 +227,7 @@ esac
 
 get_modules gnulib.modules
 
-gnulib_modules=`sort -u modlist.tmp`
+gnulib_modules=`echo "$gnulib_modules" | sort -u`
 previous_gnulib_modules=
 while [ "$gnulib_modules" != "$previous_gnulib_modules" ]; do
   previous_gnulib_modules=$gnulib_modules




reply via email to

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