aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/build-commits.sh
blob: bc44d5d768cc9c0057b88260db09a89f93a82e8e (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
#!/bin/bash


echo "Usage: $0 first-commit last-commit  (e.g. $0 97de5 HEAD)"

for commit in $(  git log --oneline $1..$2 | awk '{print $1;}' ); 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 "Done!"