From 63a3b51d7464f381eed3cd68aea189fdd12e7e24 Mon Sep 17 00:00:00 2001 From: Christian Wiese Date: Tue, 9 Aug 2011 10:45:43 +0200 Subject: [PATCH] patch-cksum.sh: fixed to not use an absolute path while creating a cksum patch --- lib/sde-package/patch-cksum.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/sde-package/patch-cksum.sh b/lib/sde-package/patch-cksum.sh index 84fdb9f..630e80b 100755 --- a/lib/sde-package/patch-cksum.sh +++ b/lib/sde-package/patch-cksum.sh @@ -3,7 +3,7 @@ # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: lib/sde-package/patch-cksum.sh -# Copyright (C) 2006 - 2007 The OpenSDE Project +# Copyright (C) 2006 - 2011 The OpenSDE Project # Copyright (C) 2004 - 2006 The T2 SDE Project # Copyright (C) 1998 - 2003 Clifford Wolf # @@ -64,7 +64,9 @@ cksum_file() { return -1 fi - cp $1 /tmp/$$ + local tmpdir="tmp/patch-cksum" + mkdir -p $tmpdir + cp $1 $tmpdir/$$ eval "egrep -v '^#' $1 | $has_D" | while read cksum file url args; do [ "$cksum" = 'X' ] && continue [ "$cksum" != '0' -a "$override" = '0' ] && continue @@ -85,11 +87,11 @@ cksum_file() { echo "!!! Checksum of $file changed (was $cksum)." >&2 fi - eval "sed \"$sedscript\" -i /tmp/$$" + eval "sed \"$sedscript\" -i $tmpdir/$$" done - diff -u ./$1 /tmp/$$ - rm -f /tmp/$$ + diff -u ./$1 ./$tmpdir/$$ + rm -f $tmpdir/$$ } for f in $files; do