--- /dev/null
+#!/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