]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- removed all uses of "is_there_line" - adapter can be now used as
authorSebastian Zagrodzki <sebek@zagrodzki.net>
Mon, 31 Jul 2000 08:37:23 +0000 (08:37 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  pipeline filter (%r!adapter.awk works in vim :) )

Changed files:
    adapter.awk -> 1.67

adapter.awk

index 41c7afd69e15cceaf0346f556b4105e233da3029..72e766b441b805085fa0d4b101ba558aaaa974d2 100644 (file)
@@ -24,10 +24,6 @@ BEGIN {
        # Temporary file for changelog section
        changelog_file = ENVIRON["HOME"] "/tmp/adapter.changelog"
 
-       # 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
@@ -62,7 +58,9 @@ defattr == 1 {
 # Remove defining _applnkdir (this macro has been included in rpm-3.0.4)
 /^%define/ {
        if ($2 == "_applnkdir")
-               next                                    
+               next
+       if ($2 == "date")
+               date = 1
 }
 
 # descriptions:
@@ -411,20 +409,6 @@ END {
        }
 }
 
-# This function uses grep to determine if there is line (in the current file)
-# which matches regexp.
-function is_there_line(line, l)
-{
-       command = "grep \"" line "\" " ARGV[1]
-       command | getline l
-       close(command)
-
-       if (l != "")
-               return 1
-       else
-               return 0
-}
-
 # There should be one or two tabs after the colon.
 function format_preamble()
 {
This page took 0.028206 seconds and 4 git commands to generate.