ia64/xen-unstable

changeset 6860:9e4fb055be80

Script to generate diffs between linux-xen subdirs and real linux
author djm@kirby.fc.hp.com
date Fri Sep 16 16:48:44 2005 -0600 (2005-09-16)
parents 6bf96d977ecc
children 7fd1b4d42d94
files xen/arch/ia64/tools/linux-xen-diffs
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/xen/arch/ia64/tools/linux-xen-diffs	Fri Sep 16 16:48:44 2005 -0600
     1.3 @@ -0,0 +1,25 @@
     1.4 +# generate a patch for all the files in linux-xen directories
     1.5 +# (these are files that are identical to linux except for a few small changes)
     1.6 +# run in the main xen directory
     1.7 +LINUXPATH=/home/djm/linux-2.6.13
     1.8 +OUTFILE=/tmp/linux-xen-diffs
     1.9 +wd=$PWD
    1.10 +for i in include/asm-ia64/linux-xen/asm include/asm-ia64/linux-xen/linux arch/ia64/linux-xen
    1.11 +do
    1.12 +echo '#############' $i '#############'
    1.13 +cd $i
    1.14 +ln -s $LINUXPATH xxx
    1.15 +cat README.origin | grep -v '^#' | grep -v '^[ 	]*$' | \
    1.16 +	sed -e 's/[ 	]*-> linux/ xxx/' | \
    1.17 +	sed -e 's/^/diff -Naur /' | bash
    1.18 +rm -f xxx
    1.19 +cd $wd
    1.20 +done > $OUTFILE
    1.21 +echo 'Total lines in patch:' `cat $OUTFILE | grep -v '########' | wc -l`
    1.22 +echo 'Approx. changes in patch:' `cat $OUTFILE | grep -v '########' | \
    1.23 +	grep -- '-#if' | wc -l`
    1.24 +echo 'Total lines added by patch:' `cat $OUTFILE | grep -v '########' | \
    1.25 +	grep -- '^-' | wc -l`
    1.26 +echo 'Total non-conditional-compile lines added by patch:' \
    1.27 +	`cat $OUTFILE | grep -v '########' | grep -- '^-' | \
    1.28 +	egrep -v '^-#if|^-#else|^-#endif' | wc -l`