summaryrefslogtreecommitdiffstats
path: root/src/settings/kdesvn-use-external-update.sh
blob: c97242aa73ab47d268faa0d8447722d82a26f982 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh

display=
lastvalue=

while read line ; do
    if [ "${line#\[}" != "$line" ]; then
       continue;
    fi
    KEY="${line%%=*}"
    VALUE="${line#*=}"
    if echo "$KEY" | grep 'use_kompare_for_diff' >/dev/null 2>/dev/null; then
        display=$VALUE
	echo '# DELETE [general_items]use_kompare_for_diff'
    elif echo "$KEY" | grep 'external_diff_display' > /dev/null 2>/dev/null; then
    	exdisplay=$VALUE
    elif [ "x$KEY" != "x" ]; then
	echo "$KEY=$VALUE"
    fi
done

if [ "x$exdisplay" = "x" -o "x$display" = "x1" ]; then
    exdisplay="kompare -on -"
fi
if [ "x$display" = "x2" -o "x$display" = "x1" ]; then
    display=true
else
    display=false
fi
echo "use_external_diff=$display"
echo "external_diff_display=$exdisplay"