aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/build-commits.sh
blob: 5a3a775ea1ffd2133dc45c5826405e8c109012b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash


echo "Usage: $0 GIT-RANGE  (e.g. $0 97de5..HEAD)"
COMMITS=$(git log --oneline $1 | awk '{print $1;}')

echo operating on: $COMMITS

for commit in $COMMITS; do
    echo Building Commit: $commit

    echo Creating directory build-$commit
    rm -r build-$commit
    mkdir build-$commit

    echo cleaning...
    make clean >> ./build-$commit/out.log

    echo checking out $commit
    git checkout $commit  >> ./build-$commit/out.log

    echo cleaning...
    make clean >> ./build-$commit/out.log

    echo building... tail ./build-$commit/out.log to observe
    make >> ./build-$commit/out.log

    echo copying result to ./build-$commit
    cp -r build ./build-$commit
    
    echo Finished building $commit
done

echo Checking out master
git checkout master

echo Done!