]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- use mktemp instead of hardcoded tmp path
authorElan Ruusamäe <glen@pld-linux.org>
Sat, 13 Aug 2011 04:58:54 +0000 (04:58 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    adapter.awk -> 1.495

adapter.awk

index 84a5318c985837d1b82e3ce4f824102f76c8c51d..fdbd5098310214b14ca7c016704795ccbaf4da06 100644 (file)
@@ -66,7 +66,7 @@ BEGIN {
        system("[ -d ../PLD-doc ] && cd ../PLD-doc && ([ -f BuildRequires.txt ] || cvs up BuildRequires.txt >/dev/null)");
 
        # Temporary file for changelog section
-       changelog_file = ENVIRON["HOME"] "/tmp/adapter.changelog"
+       changelog_file = mktemp("adapter.changelogXXXXXX")
 }
 
 # There should be a comment with CVS keywords on the first line of file.
@@ -93,6 +93,12 @@ defattr == 1 {
        defattr = 0
 }
 
+# call mktemp(1) and return the value
+function mktemp(template, tmp) {
+   "mktemp " template | getline tmp
+   return tmp
+}
+
 function b_makekey(a, b,       s) {
        s = a "" b;
        # kill bcond
This page took 0.094474 seconds and 4 git commands to generate.