[packages/adapter: 9/631] version 0.7 - now it works OK even if line "%changelog" is the last in file
glen
glen at pld-linux.org
Mon Sep 12 19:35:13 CEST 2016
commit a1aa497680788c8bc8aabccf26313d4be330937f
Author: kura <kura at pld-linux.org>
Date: Sat Dec 11 12:42:49 1999 +0000
version 0.7
- now it works OK even if line "%changelog" is the last in file
Changed files:
adapter.awk -> 1.9
adapter.awk | 28 ++++++++++++++++++----------
1 file changed, 18 insertions(+), 10 deletions(-)
---
diff --git a/adapter.awk b/adapter.awk
index 8e61dd5..39cb6aa 100644
--- a/adapter.awk
+++ b/adapter.awk
@@ -1,6 +1,6 @@
#!/bin/awk -f
#
-# This is adapter v0.6. Adapter adapts .spec files for PLD.
+# This is adapter v0.7. Adapter adapts .spec files for PLD.
# Copyright (C) 1999 Micha� Kuratczyk <kura at pld.org.pl>
BEGIN {
@@ -62,11 +62,11 @@ bof == 1 {
# no lines contain 'chown' or 'chgrp', which changes
# owner/group to 'root'
if ($1 ~ /chown|chgrp/ && $2 ~ /root|root.root/)
- noprint = 1;
+ next;
# no lines contain 'chmod' if it sets the modes to '644'
if ($1 ~ /chmod/ && $2 ~ /644/)
- noprint = 1;
+ next;
# 'gzip -9nf' for compressing
if ($1 ~ /gzip|bzip2/) {
@@ -101,9 +101,11 @@ bof == 1 {
}
# Define date macro.
- if (boc == 2 && date == 0) {
- printf "%%define date\t%%(echo `LC_ALL=\"C\"";
- print " date +\"%a %b %d %Y\"`)"
+ if (boc == 2) {
+ if (date == 0) {
+ printf "%%define date\t%%(echo `LC_ALL=\"C\"";
+ print " date +\"%a %b %d %Y\"`)"
+ }
boc--;
}
}
@@ -170,9 +172,15 @@ preamble == 1 {
if (/%define date/)
date = 1;
- if (noprint == 0)
- print;
- else
- noprint = 0;
+ print;
+}
+
+END {
+ if (boc == 1) {
+ print "* %{date} PLD Team <pld-list at pld.org.pl>";
+ printf "All below listed persons can be reached on ";
+ print "<cvs_login>@pld.org.pl\n";
+ print "$" "Log:$";
+ }
}
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/adapter.git/commitdiff/6ca0126d4d0c8c79feb7db10b0a0fade0f3b8885
More information about the pld-cvs-commit
mailing list