use os.sh for more functionality.

This commit is contained in:
Christopher Jeffrey 2014-12-07 02:02:51 -08:00
parent 4ff5f8fd6a
commit a3cf6cc083
3 changed files with 24 additions and 8 deletions

View File

@ -10,10 +10,8 @@
' && echo "$LEVELDB_INCLUDE"'\ ' && echo "$LEVELDB_INCLUDE"'\
' || test "$BITCOIN_DIR" && echo "${BITCOIN_DIR}/src/leveldb/include"' \ ' || test "$BITCOIN_DIR" && echo "${BITCOIN_DIR}/src/leveldb/include"' \
' || echo ./include)', ' || echo ./include)',
'BITCOIN_DIR': '<!(test -n "$BITCOIN_DIR"'\ 'BITCOIN_DIR': '<!(./platform/os.sh btcdir)',
' && echo "$BITCOIN_DIR"'\ 'LIBBITCOIND': '<!(./platform/os.sh lib)',
' || echo "${HOME}/bitcoin")',
'LIBBITCOIND': '<!(./platform/os.sh)',
}, },
'defines': [ 'defines': [
'ENABLE_WALLET=1', 'ENABLE_WALLET=1',

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
cur_dir="$(pwd)" cur_dir="$(pwd)"
os_dir=$(dirname "$(./platform/os.sh)") os_dir=$(./platform/os.sh osdir)
if test -e "${os_dir}/libbitcoind.so"; then if test -e "${os_dir}/libbitcoind.so"; then
read -r -p 'libbitcoind.so already built. Rebuild? (Y/n): ' choice read -r -p 'libbitcoind.so already built. Rebuild? (Y/n): ' choice

View File

@ -1,7 +1,13 @@
#!/bin/bash #!/bin/bash
if test -n "$BITCOIN_DIR" -a -e "${BITCOIN_DIR}/src/libbitcoind.so"; then if test x"$1" = x'btcdir'; then
echo -n "${BITCOIN_DIR}/src/libbitcoind.so" 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 exit 0
fi fi
@ -43,4 +49,16 @@ if test -z "$os"; then
fi fi
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