Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=kdetesting.git;a=commitdiff;h=a808e2fb2e2c8b64f6946d01fa644fc13be065d8

commit a808e2fb2e2c8b64f6946d01fa644fc13be065d8
Author: Miklos Vajna <vmik...@frugalware.org>
Date:   Wed Jan 20 13:40:51 2010 +0100

include/util.sh: use mktemp in Ftreecmp()

diff --git a/source/include/util.sh b/source/include/util.sh
index c82b145..e715aae 100644
--- a/source/include/util.sh
+++ b/source/include/util.sh
@@ -480,7 +480,7 @@ Fdeststrip() {
# first tree to the second tree.
###
Ftreecmp() {
-       local line
+       local line old=$(mktemp) new=$(mktemp)
if [ ! -d "$1" -o ! -d "$2" ]; then
Fmessage "$1 or $2 is not a directory"
Fdie
@@ -489,13 +489,15 @@ Ftreecmp() {
Fmessage "Comparison function is empty"
Fdie
fi
-       diff --new-line-format='+%L' --old-line-format='-%L' 
--unchanged-line-format='=%L' \
-               <(cd "$1" && find $_F_treecmp_findopts | sort) \
-               <(cd "$2" && find $_F_treecmp_findopts | sort) \
+       (cd "$1" && find $_F_treecmp_findopts | sort) > $old
+       (cd "$2" && find $_F_treecmp_findopts | sort) > $new
+       diff --new-line-format='+%L' --old-line-format='-%L'
+               --unchanged-line-format='=%L' $old $new \
| while read line
do
$3 $line
done
+       rm $old $new
}

###
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to