comments on current status before moving on
[wextoolbox.git] / check-lxc.sh
1 #!/bin/bash
2
3 # this utility is to compare the current build settings with the one from mainstream
4
5 COMMAND=$(basename $0)
6
7 REF=$HOME/git/build
8
9 function usage () {
10     echo "Usage: $COMMAND update|body|tags"
11     echo "update: performs svn up on the mainstream build dir"
12     echo "body: compares the .mk file"
13     echo "tags: compares the tags (from lxc-tags.mk)"
14     exit 1
15 }
16
17 function update () {
18     echo "Updating $REF"
19     (cd $REF ; git pull)
20     echo "Update done"
21 }
22
23 function check_body () {
24     a=$REF/lxc.mk
25     b=wexlxc.mk
26     echo "Checking body $a $b"
27     diff -w $a $b | egrep -v '^(<|>)( #| +$)|nozomi|comgt|planetlab-umts-tools|boost|gnuradio|bbn|crunchxml|spectools|sge|iwlwifi|kernelconfig=planetlab|umts|DistributedRateLimiting'
28 }
29
30 function check_tags () {
31     a=$REF/lxc-tags.mk
32     b=wextoolbox-tags.mk
33     sed -e s,onelab.eu,planet-lab.org,g $b > $b.norm
34     echo "Checking tags $a $b"
35     diff -w $REF/lxc-tags.mk $b.norm | egrep -v '^(<|>) #|SVNBRANCH|nozomi|comgt|planetlab-umts-tools|boost|gnuradio|bbn_80211|crunchxml|spectools|ejabberd|omf|DistributedRateLimiting|openvswitch|sfa-|sface-|^[0-9,c]*$|^---$'
36 }
37
38 [[ -z "$@" ]] && usage
39
40 for arg in "$@" ; do
41     case $arg in
42         up*) update ;;
43         bo*) check_body ;;
44         ta*) check_tags ;;
45         *) usage;;
46     esac
47 done