assume git presence.

This commit is contained in:
Christopher Jeffrey 2014-12-07 00:24:57 -08:00
parent 00975732a7
commit 73edde12c2
2 changed files with 18 additions and 12 deletions

View File

@ -35,6 +35,11 @@ fi
cd "$btc_dir" || exit 1 cd "$btc_dir" || exit 1
if ! test -d .git; then
echo 'Please point this script to an upstream bitcoin git repo.'
exit 1
fi
./autogen.sh || exit 1 ./autogen.sh || exit 1
if test -n "$1"; then if test -n "$1"; then
./configure --enable-daemonlib --with-incompatible-bdb "$@" || exit 1 ./configure --enable-daemonlib --with-incompatible-bdb "$@" || exit 1

View File

@ -5,22 +5,23 @@ patch_file="$(pwd)/libbitcoind.patch"
cd "$dir" || exit 1 cd "$dir" || exit 1
if test -e .git; then if ! test -d .git; then
git checkout 4383319e4e0cb96818d2be734f7280181daac9fa echo 'Please point this script to an upstream bitcoin git repo.'
if test $? -ne 0; then exit 1
fi
git checkout 4383319e4e0cb96818d2be734f7280181daac9fa
if test $? -ne 0; then
echo 'Unable to checkout necessary commit.' echo 'Unable to checkout necessary commit.'
echo 'Please pull the latest HEAD from the upstream bitcoin repo.' echo 'Please pull the latest HEAD from the upstream bitcoin repo.'
exit 1 exit 1
fi
git checkout -b "libbitcoind-$(date '+%Y.%m.%d')" || exit 1
fi fi
git checkout -b "libbitcoind-$(date '+%Y.%m.%d')" || exit 1
patch -p1 < "$patch_file" || exit 1 patch -p1 < "$patch_file" || exit 1
if test -e .git; then git add --all || exit 1
git add --all || exit 1 git commit -a -m 'allow compiling of libbitcoind.so.' || exit 1
git commit -a -m 'allow compiling of libbitcoind.so.' || exit 1
fi
echo 'Patch completed successfully.' echo 'Patch completed successfully.'
exit 0 exit 0