git-migration: tree_filter.sh - improve changelog truncation filter

glen glen at pld-linux.org
Fri Feb 18 08:58:49 CET 2011


Author: glen                         Date: Fri Feb 18 07:58:49 2011 GMT
Module: git-migration                 Tag: HEAD
---- Log message:
- improve changelog truncation filter

---- Files affected:
git-migration:
   tree_filter.sh (1.3 -> 1.4) 

---- Diffs:

================================================================
Index: git-migration/tree_filter.sh
diff -u git-migration/tree_filter.sh:1.3 git-migration/tree_filter.sh:1.4
--- git-migration/tree_filter.sh:1.3	Mon Feb 14 07:47:29 2011
+++ git-migration/tree_filter.sh	Fri Feb 18 08:58:44 2011
@@ -1,11 +1,15 @@
 first_line='# \$Revision\$, \$Date\$'
-log_line='%define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)'
+changelog_line='%changelog'
+define_date_line='%define[\t ]*date[\t ]*.*'
 
 find -name '*.spec' |
 while read spec; do
     sed -i -e "
 		/^${first_line}$/d
-		/^${log_line}$/,\$d
+		/^${define_date_line}$/,\$d
+	" $spec
+
+    sed -i -e "
 		# kill last empty line(s)
 		\${/^\$/d}
 	" $spec
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/git-migration/tree_filter.sh?r1=1.3&r2=1.4&f=u



More information about the pld-cvs-commit mailing list