summaryrefslogtreecommitdiff
path: root/changes
blob: 9425820114d341d99af52bf4e9ee56b771eb82d9 (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/sh
. `dirname $0`/common
[ -d platform/manifest ] || lco platform/manifest

OLDVER=$1
if [ -n "$2" ]; then
	NEWVER=$2
else
	NEWVER=${ANDROIDVERSION}_r${ANDROIDREVISION}
fi
if ! echo $OLDVER |grep -q r; then
	OLDVER="${OLDVER}_r1"
fi
if ! echo $NEWVER |grep -q r; then
	NEWVER="${NEWVER}_r1"
fi

if [ -n "$3" ]; then
	MANIFEST=platform/manifest/$3.xml
else
	MANIFEST=platform/manifest/default.xml
fi

defaultrev="`xmllint --format $MANIFEST |grep '<default' |sed -e 's,.* revision=\",,;s,\".*,,'`"
echo $defaultrev

rm -f /tmp/changes.list
xmllint --format $MANIFEST |grep '<project' | while read r; do
	name="`echo $r |sed -e 's,.* name=\",,;s,\".*,,'`"
	rev=""
	if echo $r |grep -q " revision=\""; then
		rev="`echo $r |sed -e 's,.* revision=\",,;s,\".*,,'`"
	else
		rev="$defaultrev"
	fi
	lco $name $rev
	cd $SRC/$name
	git diff android-${OLDVER}..android-${NEWVER} >/tmp/changes.diff
	if [ -s /tmp/changes.diff ]; then
		echo $name >>/tmp/changes.list
	fi
done
if [ -e /tmp/changes.list ]; then
	echo "Changes affect:"
	cat /tmp/changes.list
else
	echo "No changes"
fi
rm -f /tmp/changes.list /tmp/changes.diff