Build libwallet if new version exists

This commit is contained in:
Jaquee 2017-01-16 14:14:12 +01:00
parent e08871a77e
commit 7f9cc73485
No known key found for this signature in database
GPG key ID: 384E52B09F45DC39

View file

@ -40,9 +40,27 @@ ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
MONERO_DIR=monero
MONEROD_EXEC=monerod
# Build libwallet if monero folder doesnt exist
if [ ! -d $MONERO_DIR/src ]; then
# Build libwallet if it doesnt exist
if [ ! -f $MONERO_DIR/lib/libwallet_merged.a ]; then
echo "libwallet_merged.a not found - Building libwallet"
$SHELL get_libwallet_api.sh $BUILD_TYPE
else
source ./$MONERO_DIR/version.sh
# update monero submodule
git submodule update
# compare submodule version with latest build
pushd "$MONERO_DIR"
get_tag
popd
echo "latest libwallet version: $GUI_MONERO_VERSION"
echo "Installed libwallet version: $VERSIONTAG"
# check if recent
if [ "$VERSIONTAG" != "$GUI_MONERO_VERSION" ]; then
echo "Building new libwallet version $GUI_MONERO_VERSION"
$SHELL get_libwallet_api.sh $BUILD_TYPE
else
echo "latest libwallet ($GUI_MONERO_VERSION) is already built. Run ./get_libwallet_api.sh to force rebuild"
fi
fi
# build zxcvbn
@ -73,6 +91,7 @@ pushd "$MONERO_DIR"
get_tag
popd
echo "var GUI_MONERO_VERSION = \"$VERSIONTAG\"" >> version.js
echo "GUI_MONERO_VERSION=\"$VERSIONTAG\"" >> $MONERO_DIR/version.sh
cd build
qmake ../monero-wallet-gui.pro "$CONFIG"