packages: adapter.awk - use mktemp instead of hardcoded tmp path
glen
glen at pld-linux.org
Sat Aug 13 06:58:59 CEST 2011
Author: glen Date: Sat Aug 13 04:58:59 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- use mktemp instead of hardcoded tmp path
---- Files affected:
packages:
adapter.awk (1.494 -> 1.495)
---- Diffs:
================================================================
Index: packages/adapter.awk
diff -u packages/adapter.awk:1.494 packages/adapter.awk:1.495
--- packages/adapter.awk:1.494 Fri Jul 22 16:58:06 2011
+++ packages/adapter.awk Sat Aug 13 06:58:54 2011
@@ -66,7 +66,7 @@
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.
@@ -91,6 +91,12 @@
}
}
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) {
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/adapter.awk?r1=1.494&r2=1.495&f=u
More information about the pld-cvs-commit
mailing list