2016-05-17 13:03:59 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
|
|
BITMONERO_URL=https://github.com/mbg033/bitmonero
|
|
|
|
CPU_CORE_COUNT=$(grep -c ^processor /proc/cpuinfo)
|
|
|
|
pushd $(pwd)
|
|
|
|
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
|
|
|
|
|
|
|
|
INSTALL_DIR=$ROOT_DIR/wallet
|
|
|
|
BITMONERO_DIR=$ROOT_DIR/bitmonero
|
|
|
|
|
|
|
|
|
|
|
|
if [ ! -d $BITMONERO_DIR ]; then
|
|
|
|
git clone --depth=1 $BITMONERO_URL $BITMONERO_DIR
|
2016-06-10 13:41:13 +00:00
|
|
|
else
|
|
|
|
cd $BITMONERO_DIR;
|
|
|
|
git pull;
|
2016-05-17 13:03:59 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
rm -fr $BITMONERO_DIR/build
|
|
|
|
mkdir -p $BITMONERO_DIR/build/release
|
|
|
|
pushd $BITMONERO_DIR/build/release
|
|
|
|
|
2016-05-27 08:00:26 +00:00
|
|
|
cmake -D CMAKE_BUILD_TYPE=Release -D STATIC=ON -D CMAKE_INSTALL_PREFIX="$BITMONERO_DIR" ../..
|
2016-05-17 13:03:59 +00:00
|
|
|
|
|
|
|
pushd $BITMONERO_DIR/build/release/src/wallet
|
|
|
|
make -j$CPU_CORE_COUNT
|
|
|
|
make install -j$CPU_CORE_COUNT
|
|
|
|
popd
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|