2014-12-06 16:01:03 -08:00
|
|
|
#!/bin/sh
|
2014-12-06 15:56:26 -08:00
|
|
|
|
|
|
|
dir=$(test -n "$1" && echo "$1" || echo "${HOME}/bitcoin")
|
2014-12-06 16:03:02 -08:00
|
|
|
patch_file="$(pwd)/libbitcoind.patch"
|
2014-12-06 16:01:03 -08:00
|
|
|
|
2014-12-06 15:56:26 -08:00
|
|
|
cd "$dir" || exit 1
|
2014-12-06 16:01:03 -08:00
|
|
|
|
|
|
|
if test -e .git; then
|
|
|
|
git checkout -b libbitcoind || exit 1
|
|
|
|
fi
|
|
|
|
|
2014-12-06 16:03:02 -08:00
|
|
|
patch -p1 < "$patch_file" || exit 1
|
2014-12-06 16:01:03 -08:00
|
|
|
|
|
|
|
if test -e .git; then
|
|
|
|
git add --all || exit 1
|
|
|
|
git commit -a -m 'allow compiling of libbitcoind.so.' || exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo 'Patch completed successfully.'
|
|
|
|
exit 0
|