From 3c6a8648eb495d02a59d08e8c7d0fc54f650106a Mon Sep 17 00:00:00 2001 From: kura Date: Tue, 21 Mar 2000 23:29:19 +0000 Subject: [PATCH] version 0.14 - fixed problems with empty %changelog Changed files: adapter.awk -> 1.25 --- adapter.awk | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/adapter.awk b/adapter.awk index 46db8f0..fba83f8 100644 --- a/adapter.awk +++ b/adapter.awk @@ -1,6 +1,6 @@ #!/bin/awk -f # -# This is adapter v0.13. Adapter adapts .spec files for PLD. +# This is adapter v0.14. Adapter adapts .spec files for PLD. # Copyright (C) 1999 Micha³ Kuratczyk BEGIN { @@ -182,7 +182,7 @@ defattr == 1 { boc-- } - if (!/^%[a-z]+$/ || /%changelog/) + if (!/^%[a-z]+$/ || /changelog/) print > changelog_file else print @@ -275,21 +275,19 @@ preamble == 1 { } END { - if (changelog_file) + if (changelog_file) { close(changelog_file) - + while ((getline < changelog_file) > 0) + print + system("rm -f " changelog_file) + } + if (boc == 1) { print "* %{date} PLD Team " printf "All below listed persons can be reached on " print "@pld.org.pl\n" print "$" "Log:$" - } else { - while ((getline < changelog_file) > 0) - print } - - if (changelog_file) - system("rm -f " changelog_file) } # This function uses grep to determine if there is line (in the current file) -- 2.44.0