From: Thierry Parmentelat Date: Sun, 4 Jul 2010 09:19:28 +0000 (+0200) Subject: utility script for syncing X-Git-Url: http://git.onelab.eu/?p=wextoolbox.git;a=commitdiff_plain;h=e5c6207b459c47215b426d511758969865aad45f utility script for syncing --- diff --git a/check-onelab.sh b/check-onelab.sh new file mode 100755 index 0000000..6eb4bf8 --- /dev/null +++ b/check-onelab.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +# this utility is to compare the current build settings with the one from onelab + +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 (taken from k27)" + exit 1 +} + +function update () { + echo "Updating $REF" + (cd $REF ; git pull) + echo "Update done" +} + +function check_body () { + a=$REF/onelab.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/onelab-k27-tags.mk + b=wextoolbox-tags.mk + echo "Checking tags $a $b" + diff -w $REF/onelab-k27-tags.mk wextoolbox-tags.mk | egrep -v '^(<|>) #|SVNBRANCH|nozomi|comgt|planetlab-umts-tools|boost|gnuradio|bbn_80211|crunchxml|spectools|ejabberd|omf|DistributedRateLimiting' +} + +[[ -z "$@" ]] && usage + +for arg in "$@" ; do + case $arg in + up*) update ;; + bo*) check_body ;; + ta*) check_tags ;; + *) usage;; + esac +done