2015-07-08 11:24:26 -07:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/.."
|
|
|
|
cd "${root_dir}"
|
|
|
|
|
|
|
|
debug=
|
|
|
|
if test x"$1" = x'debug'; then
|
2015-07-10 07:34:15 -07:00
|
|
|
debug=--debug
|
2015-08-04 12:49:01 -07:00
|
|
|
cached_file="${root_dir}"/build/Debug/bitcoind.node
|
|
|
|
else
|
|
|
|
cached_file="${root_dir}"/build/Release/bitcoind.node
|
2015-07-08 11:24:26 -07:00
|
|
|
fi
|
|
|
|
|
2015-08-04 12:49:01 -07:00
|
|
|
|
|
|
|
if [ ! -f "${cached_file}" ]; then
|
|
|
|
node-pre-gyp ${debug} rebuild --fallback-to-build
|
|
|
|
fi
|
2015-07-08 11:24:26 -07:00
|
|
|
|
|
|
|
|