CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
Added more verbose to makeRootfs script and cleanup
[devtools.git] / getCoreDiff.sh
... / ...
CommitLineData
1#!/bin/bash
2
3# getCoreDiff.sh: Script that fetch the current sources of core, core-arm
4# and core-cross collections, and find differences between them
5
6msgError() {
7 echo "Error, $@" 2>&1
8 rm -rf $TMPDIR
9 exit 1
10}
11
12TMPDIR=$(mktemp -d)
13
14version="2.8"
15
16gitrepo_core="git://crux.nu/ports/core.git"
17gitrepo_core_arm="git://crux-arm.nu/crux-arm/ports/core-arm.git"
18gitrepo_core_cross="git://crux-arm.nu/crux-arm/ports/core-cross.git"
19
20# handle signals
21trap "msgError interrupted" SIGINT SIGTERM
22
23echo "+ Fetching git sources..."
24
25echo "++ ${gitrepo_core}..."
26cd $TMPDIR && \
27 git clone $gitrepo_core && \
28 cd core && \
29 git branch $version origin/$version && \
30 git checkout $version
31
32echo "++ ${gitrepo_core_arm}..."
33cd $TMPDIR && \
34 git clone $gitrepo_core_arm && \
35 cd core-arm && \
36 git branch $version origin/$version && \
37 git checkout $version
38
39echo "++ ${gitrepo_core_cross}..."
40cd $TMPDIR && \
41 git clone $gitrepo_core_cross && \
42 cd core-cross && \
43 git branch $version origin/$version && \
44 git checkout $version
45
46echo "+ Generating data..."
47# core list
48cd $TMPDIR/core && find -type d | grep -v '.git' | sed 's|./||' | sed 1d | sort -u > $TMPDIR/core.lst
49# core-arm list
50cd $TMPDIR/core-arm && find -type d | grep -v '.git' | sed 's|./||' | sed 1d | sort -u > $TMPDIR/core-arm.lst
51# core-cross list
52cd $TMPDIR/core-cross && find -type d | grep -v '.git' | sed 's|./||' | sed 1d | sort -u > $TMPDIR/core-cross.lst
53
54echo
55echo "+ core => core-arm: extra ports in core-arm"
56echo "-------------------------------------------------"
57comm -13 $TMPDIR/core.lst $TMPDIR/core-arm.lst
58echo
59echo "+ core => core-cross: extra ports in core-cross"
60echo "-------------------------------------------------"
61comm -13 $TMPDIR/core.lst $TMPDIR/core-cross.lst
62echo
63echo "+ core => core-cross: missing ports in core-cross"
64echo "-------------------------------------------------"
65comm -23 $TMPDIR/core.lst $TMPDIR/core-cross.lst
66echo
67echo "+ core => core-arm: overlayed ports in core-arm"
68echo "-------------------------------------------------"
69comm -12 $TMPDIR/core.lst $TMPDIR/core-arm.lst
70
71rm -fr $TMPDIR
72
73# End of file