From: Jose V Beneyto Date: Wed, 25 Apr 2012 12:18:30 +0000 (+0200) Subject: Initial import for getCoreDiff script X-Git-Url: http://gitweb/?a=commitdiff_plain;h=eff5b070187196f63b4969f44730a4ab90fc9e02;p=devtools.git Initial import for getCoreDiff script --- diff --git a/getCoreDiff.sh b/getCoreDiff.sh new file mode 100644 index 0000000..7a2c444 --- /dev/null +++ b/getCoreDiff.sh @@ -0,0 +1,71 @@ +#!/bin/bash + +# getCoreDiff.sh: Script that fetch the current sources of core, core-arm +# and core-cross collections, and find differences between them + +msgError() { + echo "Error, $@" 2>&1 + rm -rf $TMPDIR + exit 1 +} + +TMPDIR=$(mktemp -d) + +version="2.7" + +gitrepo_core="git://crux.nu/ports/core.git" +gitrepo_core_arm="git://crux-arm.nu/crux-arm/ports/core-arm.git" +gitrepo_core_cross="git://crux-arm.nu/crux-arm/ports/core-cross.git" + +# handle signals +trap "msgError interrupted" SIGINT SIGTERM + +echo "+ Fetching git sources..." + +echo "++ $gitrepo_core" +cd $TMPDIR && \ + git clone $gitrepo_core && \ + cd core && \ + git branch 2.7 origin/2.7 && \ + git checkout 2.7 + +echo "++ $gitrepo_core_arm" +cd $TMPDIR && \ + git clone $gitrepo_core_arm && \ + cd core-arm && \ + git branch 2.7 origin/2.7 && \ + git checkout 2.7 + +echo "++ $gitrepo_core_cross" +cd $TMPDIR && \ + git clone $gitrepo_core_cross && \ + cd core-cross && \ + git branch 2.7 origin/2.7 && \ + git checkout 2.7 + +echo "+ Generating data..." +# core list +cd $TMPDIR/core && find -type d | grep -v '.git' | sed 's|./||' | sed 1d | sort -u > $TMPDIR/core.lst +# core-arm list +cd $TMPDIR/core-arm && find -type d | grep -v '.git' | sed 's|./||' | sed 1d | sort -u > $TMPDIR/core-arm.lst +# core-cross list +cd $TMPDIR/core-cross && find -type d | grep -v '.git' | sed 's|./||' | sed 1d | sort -u > $TMPDIR/core-cross.lst + +echo +echo "++++++++++++++++++++ RESULTS ++++++++++++++++++++" +echo +echo "* New ports (core -> core-arm)" +comm -13 $TMPDIR/core.lst $TMPDIR/core-arm.lst +echo +echo "* New ports (core -> core-cross)" +comm -13 $TMPDIR/core.lst $TMPDIR/core-cross.lst +echo +echo "* Missing ports (core -> core-cross)" +comm -23 $TMPDIR/core.lst $TMPDIR/core-cross.lst +echo +echo "* Overlayed ports (core -> core-arm)" +comm -12 $TMPDIR/core.lst $TMPDIR/core-arm.lst + +rm -fr $TMPDIR + +# End of file