Fixed 'noprocess' sed script. autodist.1.2.1
authorPekka Riikonen <priikone@silcnet.org>
Sat, 23 Apr 2005 14:20:49 +0000 (14:20 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Sat, 23 Apr 2005 14:20:49 +0000 (14:20 +0000)
apps/autodist/CHANGES
apps/autodist/TODO
apps/autodist/autodist.in
apps/autodist/doc/autodist.texi

index b1b482aa6b679e73224d28cd2dedf3ed5cbec551..7f9bf01b832d67d50d8ac20ceff9ac9d3d5bfc8b 100644 (file)
@@ -1,3 +1,9 @@
+Sat Apr 23 12:49:09 EEST 2005  Pekka Riikonen <priikone@silcnet.org>
+
+       * Autodist 1.2.1.
+
+       * Fixed 'noprocess' sed script.
+
 Fri Apr 22 20:23:06 EEST 2005  Pekka Riikonen <priikone@silcnet.org>
 
        * Autodist 1.2.
index e3ffa338b402ca067b4dd362712bc3d73077b3e3..e3e00ead42729904c74acb67257dd340f72f54cd 100644 (file)
@@ -10,4 +10,7 @@ o Better 'license-header' implementation.
 o Perhaps ability to partially re-license the source tree.  Now all files
   will be processed if 'license-header' is used.
 
+o Better 'noprocess' so that it would work with directories recursively,
+  such as noprocess foo/bar, would not process anything under foo/bar.
+
 o Perhaps output autodist.log when processing the source tree.
index 0b3638ff9f7f2170b6494b5218c21231ee4c7428..2e8a361498693d01395340acc9abd003f645a958 100755 (executable)
@@ -702,7 +702,7 @@ ad_process_tree()
 
   # Take away noprocess list
   if test -f autodist.noprocess; then
-    files=`echo $files | sh autodist.noprocess` || exit 1
+    files=`echo $files" " | sh autodist.noprocess` || exit 1
   fi
 
   for ff in $files
@@ -746,7 +746,7 @@ ad_process_source_tree()
 
   # Take away noprocess list
   if test -f autodist.noprocess; then
-    files=`echo $files | sh autodist.noprocess` || exit 1
+    files=`echo $files" " | sh autodist.noprocess` || exit 1
   fi
 
   for ff in $files
@@ -1234,14 +1234,17 @@ ad_process_noprocess()
 
   ad_debug ">ad_process_noprocess"
 
+  cur=`pwd`
+  cd $am_distdir || exit 1
   for i in $noprocess
   do
     # Escape
     ie=`echo $i | sed 's/\\//\\\\\//g'` || exit 1
 
-    n="$n -e 's/$am_distdir\\/$ie//'"
+    n="$n -e 's/$am_distdir\\/$ie //'"
     np=true
   done
+  cd $cur || exit 1
 
   rm -f autodist.noprocess
   if test x$np = xtrue; then
index c146c520f06045781a392d78afdb92f78931e911..928432e43d25f0fbe69f301f426c93cb0d654548 100644 (file)
@@ -774,19 +774,22 @@ process a file.  The Autodist will not process the file during
 preparation or during distribution packaging.  This directive is optional.
 One or more file can be specified in the 'noprocess' directive.  Zero or
 more 'noprocess' directives can be used in distribution.  The <filename>
-can be a single file, a single directory or a regular expression that
-will match several files and/or directories.  If directory is specified
-then all files inside the directory will not be processed.
+can be a single file or a regular expression that will match several files.
+Note that, in current Autodist version 'noprocess' cannot be used to
+specify directories.
 
 Example:
 @example
 noprocess autodist.texi
+noprocess apps/foo/*
 @end example
 
-Autodist will not process 'autodist.texi' file.
+Autodist will not process 'autodist.texi' file, and any file that match
+'apps/foo/*'.  Note that, any subdirectory under 'apps/foo/' will not
+match, and will be processed.
 
-Note that, 'noprocess' directive cannot be used to disallow processing
-of any file with '.ad' suffix.
+Also note that, 'noprocess' directive cannot be used to disallow 
+processing of any file with '.ad' suffix.
 
 
 @section Directive: pre-hook <filename> [...]