use os.sh for more functionality.
This commit is contained in:
parent
4ff5f8fd6a
commit
a3cf6cc083
|
@ -10,10 +10,8 @@
|
|||
' && echo "$LEVELDB_INCLUDE"'\
|
||||
' || test "$BITCOIN_DIR" && echo "${BITCOIN_DIR}/src/leveldb/include"' \
|
||||
' || echo ./include)',
|
||||
'BITCOIN_DIR': '<!(test -n "$BITCOIN_DIR"'\
|
||||
' && echo "$BITCOIN_DIR"'\
|
||||
' || echo "${HOME}/bitcoin")',
|
||||
'LIBBITCOIND': '<!(./platform/os.sh)',
|
||||
'BITCOIN_DIR': '<!(./platform/os.sh btcdir)',
|
||||
'LIBBITCOIND': '<!(./platform/os.sh lib)',
|
||||
},
|
||||
'defines': [
|
||||
'ENABLE_WALLET=1',
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
cur_dir="$(pwd)"
|
||||
os_dir=$(dirname "$(./platform/os.sh)")
|
||||
os_dir=$(./platform/os.sh osdir)
|
||||
|
||||
if test -e "${os_dir}/libbitcoind.so"; then
|
||||
read -r -p 'libbitcoind.so already built. Rebuild? (Y/n): ' choice
|
||||
|
|
|
@ -1,7 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
if test -n "$BITCOIN_DIR" -a -e "${BITCOIN_DIR}/src/libbitcoind.so"; then
|
||||
echo -n "${BITCOIN_DIR}/src/libbitcoind.so"
|
||||
if test x"$1" = x'btcdir'; then
|
||||
if test -n "$BITCOIN_DIR"; then
|
||||
echo "$BITCOIND_DIR"
|
||||
elif test -d "$(pwd)/libbitcoind"; then
|
||||
echo "$(pwd)/libbitcoind"
|
||||
elif test -d "${HOME}/bitcoin"; then
|
||||
echo "${HOME}/bitcoin"
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
@ -43,4 +49,16 @@ if test -z "$os"; then
|
|||
fi
|
||||
fi
|
||||
|
||||
echo -n "$(pwd)/platform/${os}/libbitcoind.so"
|
||||
if test x"$1" = x'osdir'; then
|
||||
echo -n "$(pwd)/platform/${os}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$1" -o x"$1" = x'lib'; then
|
||||
if test -n "$BITCOIN_DIR" -a -e "${BITCOIN_DIR}/src/libbitcoind.so"; then
|
||||
echo -n "${BITCOIN_DIR}/src/libbitcoind.so"
|
||||
else
|
||||
echo -n "$(pwd)/platform/${os}/libbitcoind.so"
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue