mergetool: fixed parsing of registry entry for kdiff3

The old code failed on Windows Vista. The output of
reg.exe or something else may be a bit different.
This patch improves the parsing code to be more robust.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
This commit is contained in:
Johannes Schmidt-Ehrenberg
2007-08-13 19:00:39 +02:00
committed by Dmitry Kakurin
parent 331406ad30
commit 20e93f53e3

View File

@@ -323,7 +323,7 @@ if test -z "$merge_tool" ; then
fi
fi
regentry="$(REG QUERY 'HKEY_LOCAL_MACHINE\SOFTWARE\KDiff3\diff-ext' 2>/dev/null)" && {
KDIFF3=$(echo "$regentry" | grep diffcommand | cut -f 3 | sed -e 's@\\@/@g')
KDIFF3=$(echo "$regentry" | grep diffcommand | awk -F 'REG_SZ' '{ print $2 }' | sed -e 's/^ *//'| sed -e 's@\\@/@g')
KDIFF3SEPARATOR=
merge_tool_candidates="$merge_tool_candidates kdiff3"
}