@ -1,4 +1,10 @@
#!/bin/bash
## automatic Gitian build of bitcoin
## @author gdm85
## @version 0.3.0
## see also https://github.com/gdm85/tenku/blob/master/docker/gitian-bitcoin-host/
##
#
if [ [ ! $# -eq 1 ] ] ; then
echo "Please specify version" 1>& 2
@ -11,8 +17,7 @@ if [ ! -d bitcoin ]; then
git clone https://github.com/bitcoin/bitcoin.git || exit $?
fi
cd bitcoin && \
git checkout v${ VERSION } || exit $?
git checkout v${ VERSION } && \
cd ../gitian-builder && \
mkdir -p inputs && cd inputs/ || exit $?
@ -22,17 +27,16 @@ while read -r URL FNAME; do
if [ -z " $URL " ] ; then
continue
fi
wget --continue --no-check-certificate " $URL " -O " $FNAME " || exit $?
done < ../../input-sources/${ VERSION } .txt || exit $?
echo " wget -q --continue --no-check-certificate ' $URL ' -O ' $FNAME ' "
done < ../../input-sources/${ VERSION } .txt | parallel -j10 || exit $?
## verify that all sources are correct before continuing
md5sum -c < ../../input-sources/${ VERSION } .txt.md5 || exit $?
cd ..
./bin/gbuild ../bitcoin/contrib/gitian-descriptors/boost-linux.yml || exit $?
mv build/out/boost-*.zip inputs/
./bin/gbuild ../bitcoin/contrib/gitian-descriptors/deps-linux.yml || exit $?
mv build/out/bitcoin-deps-*.zip inputs/
./bin/gbuild --commit bitcoin = v${ VERSION } ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml || exit $?
echo "Completed successfully."
md5sum -c < ../../input-sources/${ VERSION } .txt.md5 && \
cd .. && \
./bin/gbuild ../bitcoin/contrib/gitian-descriptors/boost-linux.yml && \
mv build/out/boost-*.zip inputs/ && \
./bin/gbuild ../bitcoin/contrib/gitian-descriptors/deps-linux.yml && \
mv build/out/bitcoin-deps-*.zip inputs/ && \
./bin/gbuild --commit bitcoin = v${ VERSION } ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml && \
echo "Completed successfully." && \
echo "The output files are in: gitian-builder/build/out/"