summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2003-01-30 22:17:25 +0000
committerAndreas Gruenbacher <agruen@suse.de>2003-01-30 22:17:25 +0000
commitdfeb8d915f4e0c26832990d13e8ccc4b9a7f4def (patch)
tree9e7facd73560c45ad3bb37c9c610ca73ee903619
parent57e989cee7a8ffda068907c6aab3c80a2e42120b (diff)
downloadquilt-dfeb8d915f4e0c26832990d13e8ccc4b9a7f4def.tar.gz
Also substitute @MKTEMP@
-rw-r--r--Makefile2
-rw-r--r--lib/patchfns.in10
-rw-r--r--quilt.changes5
-rw-r--r--quilt/add.in2
-rw-r--r--quilt/diff.in2
-rw-r--r--quilt/import.in6
-rw-r--r--quilt/refresh.in4
-rw-r--r--quilt/remove.in2
-rw-r--r--quilt/setup.in2
9 files changed, 21 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index e265cc8..ab0c47c 100644
--- a/Makefile
+++ b/Makefile
@@ -15,6 +15,7 @@ PERL := /usr/bin/perl
BASH := /bin/bash
DIFF := /usr/bin/diff
PATCH := /usr/bin/patch
+MKTEMP := /bin/mktemp
CFLAGS = -g -Wall
@@ -144,5 +145,6 @@ clean distclean :
-e "s:@BASH@:$(BASH):g" \
-e "s:@DIFF@:$(DIFF):g" \
-e "s:@PATCH@:$(PATCH):g" \
+ -e "s:@MKTEMP@:$(MKTEMP):g" \
$< > $@
@chmod --reference=$< $@
diff --git a/lib/patchfns.in b/lib/patchfns.in
index 4d57d5c..b693457 100644
--- a/lib/patchfns.in
+++ b/lib/patchfns.in
@@ -108,7 +108,7 @@ change_db_strip_level()
if [ -e $SERIES ]
then
- local tmpfile=$(mktemp /tmp/patch-scripts.XXXXXX)
+ local tmpfile=$(@MKTEMP@ /tmp/patch-scripts.XXXXXX)
awk '
/^'"$(quote_re $patch)"'(\.patch|\.diff?)(|\.gz|\.bz2)([ \t]|$)/ \
{ for(i=2; i<=NF; i++)
@@ -155,7 +155,7 @@ insert_in_series()
patch_args=" $patch_args"
fi
- tmpfile=$(mktemp /tmp/patch-scripts.XXXXXX) || return 1
+ tmpfile=$(@MKTEMP@ /tmp/patch-scripts.XXXXXX) || return 1
mkdir -p $(dirname $SERIES)
if [ -n "$top" ]
then
@@ -184,7 +184,7 @@ remove_from_series()
{
local patch=$1
- tmpfile=$(mktemp /tmp/patch-scripts.XXXXXX) || return 1
+ tmpfile=$(@MKTEMP@ /tmp/patch-scripts.XXXXXX) || return 1
awk '
! /^'"$(quote_re $patch)"'(|\.patch|\.diff?)(|\.gz|\.bz2)([ \t]|$)/ \
{ print }
@@ -418,7 +418,7 @@ remove_from_db()
{
local patch=$1
local tmpfile
- if tmpfile=$(mktemp /tmp/patch-scripts.XXXXXX)
+ if tmpfile=$(@MKTEMP@ /tmp/patch-scripts.XXXXXX)
then
grep -v -E "^$(quote_re $patch)\$" $DB > $tmpfile
mv -f $tmpfile $DB
@@ -486,7 +486,7 @@ refresh_file_list()
then
local tmpfile status
if ! mkdir -p $(dirname $pc_file) || \
- ! tmpfile=$(mktemp /tmp/patch-scripts.XXXXXX)
+ ! tmpfile=$(@MKTEMP@ /tmp/patch-scripts.XXXXXX)
then
return 1
fi
diff --git a/quilt.changes b/quilt.changes
index c75c543..059b2bf 100644
--- a/quilt.changes
+++ b/quilt.changes
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
+Thu Jan 30 23:15:36 +0100 2003 - agruen@suse.de
+
+- Also substitute @MKTEMP@.
+
+-------------------------------------------------------------------
Thu Jan 30 19:02:14 +0100 2003 - agruen@suse.de
- Allow a file list to be diffed to be passed to quilt diff. Add
diff --git a/quilt/add.in b/quilt/add.in
index c543e4f..2498bc8 100644
--- a/quilt/add.in
+++ b/quilt/add.in
@@ -116,7 +116,7 @@ do
# As the file may likely be modified by hand
# now, create a copy to make sure nothing
# happens to the original file.
- tmpfile=$(mktemp $file.XXXXXX) &&
+ tmpfile=$(@MKTEMP@ $file.XXXXXX) &&
cp -f $file $tmpfile &&
mv -f $tmpfile $file
rm -f $tmpfile
diff --git a/quilt/diff.in b/quilt/diff.in
index 9f20cbd..3e81ebe 100644
--- a/quilt/diff.in
+++ b/quilt/diff.in
@@ -195,7 +195,7 @@ if [ -n "$opt_relative" ]
then
patch_file=$(patch_file_name $last_patch)
patch_args=$(patch_args $last_patch)
- workdir=$(mktemp -d patch-scripts.XXXXXX)
+ workdir=$(@MKTEMP@ -d patch-scripts.XXXXXX)
pwd=$PWD
if ! cd .pc/$last_patch
diff --git a/quilt/import.in b/quilt/import.in
index d3d115c..eae717d 100644
--- a/quilt/import.in
+++ b/quilt/import.in
@@ -114,7 +114,7 @@ fi
case "$input_file" in
'')
- tmpfile=$(mktemp /tmp/patch-scripts.XXXXXX)
+ tmpfile=$(@MKTEMP@ /tmp/patch-scripts.XXXXXX)
if ! cat > $tmpfile
then
echo "Cannot read from standard input."
@@ -123,7 +123,7 @@ case "$input_file" in
fi
input_file=$tmpfile ;;
*.gz)
- tmpfile=$(mktemp /tmp/patch-scripts.XXXXXX)
+ tmpfile=$(@MKTEMP@ /tmp/patch-scripts.XXXXXX)
if ! gzip -cd "$input_file" > $tmpfile
then
echo "Cannot decompress file $input_file"
@@ -132,7 +132,7 @@ case "$input_file" in
fi
input_file=$tmpfile ;;
*.bz2)
- tmpfile=$(mktemp /tmp/patch-scripts.XXXXXX)
+ tmpfile=$(@MKTEMP@ /tmp/patch-scripts.XXXXXX)
if ! bzip2 -cd "$input_file" > $tmpfile
then
echo "Cannot decompress file $input_file"
diff --git a/quilt/refresh.in b/quilt/refresh.in
index d21fbf8..40ab452 100644
--- a/quilt/refresh.in
+++ b/quilt/refresh.in
@@ -129,7 +129,7 @@ fi
trap "die 1" SIGTERM
-tmpfile=$(mktemp /tmp/patch-scripts.XXXXXX)
+tmpfile=$(@MKTEMP@ /tmp/patch-scripts.XXXXXX)
for file in $(files_in_patch $patch)
do
@@ -176,7 +176,7 @@ then
cat $tmpfile \
| @LIB@/parse-patch -u patch $patch_file
else
- if ! tmpfile2=$(mktemp /tmp/patch-scripts.XXXXXX)
+ if ! tmpfile2=$(@MKTEMP@ /tmp/patch-scripts.XXXXXX)
then
die 1
fi
diff --git a/quilt/remove.in b/quilt/remove.in
index cc0960d..63d6d56 100644
--- a/quilt/remove.in
+++ b/quilt/remove.in
@@ -109,7 +109,7 @@ do
fi
pc_file=$(pc_file_name $patch)
- tmpfile=$(mktemp /tmp/patch-scripts.XXXXXX) &&
+ tmpfile=$(@MKTEMP@ /tmp/patch-scripts.XXXXXX) &&
grep -v '^'"$(quote_re $file)"'$' $pc_file > $tmpfile &&
mv -f $tmpfile $pc_file
rm -f $tmpfile
diff --git a/quilt/setup.in b/quilt/setup.in
index c4f8aff..2fc40a2 100644
--- a/quilt/setup.in
+++ b/quilt/setup.in
@@ -84,7 +84,7 @@ fi
case "$1" in
*.spec)
spec_file="$1"
- tmpfile=$(mktemp /tmp/patch-scripts.XXXXXX)
+ tmpfile=$(@MKTEMP@ /tmp/patch-scripts.XXXXXX)
series_file=$tmpfile
if ! @LIB@/spec2series "$spec_file" > $tmpfile
then