CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
makeRootfs.sh: adapted to install filesystem port before the rest
[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="3.0"
15
16gitrepo_core="git://crux.nu/ports/core.git"
17gitrepo_core_arm="git://crux-arm.nu/crux-arm/ports/core-arm.git"
18gitrepo_crossrootfs="git://crux-arm.nu/crux-arm/crossrootfs.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_crossrootfs}..."
40cd $TMPDIR && \
41 git clone $gitrepo_crossrootfs && \
42 cd crossrootfs && \
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/crossrootfs && find -type d | grep -v '.git' | sed 's|./||' | sed 1d | sort -u > $TMPDIR/crossrootfs.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 => crossrootfs: extra ports in crossrootfs"
60echo "-------------------------------------------------"
61comm -13 $TMPDIR/core.lst $TMPDIR/crossrootfs.lst
62echo
63echo "+ core => crossrootfs: missing ports in crossrootfs"
64echo "-------------------------------------------------"
65comm -23 $TMPDIR/core.lst $TMPDIR/crossrootfs.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