Skip to content

Commit 54ef860

Browse files
committed
Improve build.sh
1 parent dd1fb96 commit 54ef860

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

build.sh

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,26 @@ else
1313
JOBS=1
1414
fi
1515

16-
echo "Compiling with $JOBS threads..."
16+
VERSION=$(cat src/version.h |cut -d\" -f2)
17+
echo "Compiling SilentDragon $VERSION with $JOBS threads..."
18+
CONF=silentdragon.pro
19+
20+
set -e
21+
qbuild () {
22+
qmake $CONF CONFIG+=debug
23+
lupdate $CONF
24+
lrelease $CONF
25+
make -j$JOBS
26+
}
1727

1828
if [ "$1" == "clean" ]; then
1929
make clean
30+
elif [ "$1" == "linguist" ]; then
31+
lupdate $CONF
32+
lrelease $CONF
2033
elif [ "$1" == "cleanbuild" ]; then
2134
make clean
22-
qmake silentdragon.pro CONFIG+=debug; make -j$JOBS
35+
qbuild
2336
else
24-
qmake silentdragon.pro CONFIG+=debug; make -j$JOBS
37+
qbuild
2538
fi

0 commit comments

Comments
 (0)