forked from OleksandrBlack/safecoinwallet
-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.sh
executable file
·45 lines (39 loc) · 873 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
# Copyright 2019-2020 The Hush Developers
# Copyright 2020 Safecoin Developers
# Released under the GPLv3
set -e
UNAME=$(uname)
if [ "$UNAME" == "Linux" ] ; then
JOBS=$(nproc)
elif [ "$UNAME" == "FreeBSD" ] ; then
JOBS=$(nproc)
elif [ "$UNAME" == "Darwin" ] ; then
JOBS=$(sysctl -n hw.ncpu)
else
JOBS=1
fi
VERSION=$(cat src/version.h |cut -d\" -f2)
echo "Compiling SafeWallet $VERSION with $JOBS threads..."
CONF=safe-qt-wallet.pro
qbuild () {
qmake $CONF -spec linux-clang CONFIG+=debug
make -j$JOBS
}
qbuild_release () {
qmake $CONF -spec linux-clang CONFIG+=release
make -j$JOBS
}
if [ "$1" == "clean" ]; then
make clean
elif [ "$1" == "linguist" ]; then
lupdate $CONF
lrelease $CONF
elif [ "$1" == "cleanbuild" ]; then
make clean
qbuild
elif [ "$1" == "release" ]; then
qbuild_release
else
qbuild
fi