X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=check-lxc.sh;fp=check-lxc.sh;h=1b9629daeda74ccf876b0accbd87c90bc2894d3a;hb=7cd779f563a93865ef07a23c12ee15533dda87dc;hp=0000000000000000000000000000000000000000;hpb=34fa13809cf1a05156aa26ccfa61523897ba3d43;p=wextoolbox.git diff --git a/check-lxc.sh b/check-lxc.sh new file mode 100755 index 0000000..1b9629d --- /dev/null +++ b/check-lxc.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +# this utility is to compare the current build settings with the one from mainstream + +COMMAND=$(basename $0) + +REF=$HOME/git/build + +function usage () { + echo "Usage: $COMMAND update|body|tags" + echo "update: performs svn up on the mainstream build dir" + echo "body: compares the .mk file" + echo "tags: compares the tags (from lxc-tags.mk)" + exit 1 +} + +function update () { + echo "Updating $REF" + (cd $REF ; git pull) + echo "Update done" +} + +function check_body () { + a=$REF/lxc.mk + b=wextoolbox.mk + echo "Checking body $a $b" + diff -w $a $b | egrep -v '^(<|>)( #| +$)|nozomi|comgt|planetlab-umts-tools|boost|gnuradio|bbn|crunchxml|spectools|sge|iwlwifi|kernelconfig=planetlab|umts|DistributedRateLimiting' +} + +function check_tags () { + a=$REF/lxc-tags.mk + b=wextoolbox-tags.mk + sed -e s,onelab.eu,planet-lab.org,g $b > $b.norm + echo "Checking tags $a $b" + 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]*$|^---$' +} + +[[ -z "$@" ]] && usage + +for arg in "$@" ; do + case $arg in + up*) update ;; + bo*) check_body ;; + ta*) check_tags ;; + *) usage;; + esac +done