]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- add %changelog only when there was no %changelog before...
authorSebastian Zagrodzki <sebek@zagrodzki.net>
Mon, 26 Jun 2000 15:20:42 +0000 (15:20 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    adapter.awk -> 1.61

adapter.awk

index 7685cf020d7a206f495faf8b256a408916ea074d..b5fbe9d064e7f4bdb5fe5693a0b15519dc38a1c8 100644 (file)
@@ -27,7 +27,7 @@ BEGIN {
        # Is 'date' macro already defined?
        if (is_there_line("%define date"))
                date = 1
-       
+
        # Load rpm macros
        "rpm --eval %_prefix"   | getline prefix
        "rpm --eval %_bindir"   | getline bindir
@@ -232,8 +232,9 @@ script == 1 {
                if (date == 0) {
                        printf "%%define date\t%%(echo `LC_ALL=\"C\"" > changelog_file
                        print " date +\"%a %b %d %Y\"`)" > changelog_file
+                       date = 1
                }
-       boc--
+               boc = 1
        }
 
        if (!/^%[a-z]+$/ || /changelog/)
@@ -347,9 +348,11 @@ END {
                print ""
                print "%define date\t%(echo `LC_ALL=\"C\" date +\"%a %b %d %Y\"`)"
        }
+       
+       if (has_changelog == 0)
+               print "%changelog"
 
        if (boc > 0) {
-               print "%changelog"
                print "* %{date} PLD Team <pld-list@pld.org.pl>"
                printf "All persons listed below can be reached at "
                print "<cvs_login>@pld.org.pl\n"
This page took 0.069538 seconds and 4 git commands to generate.