diff options
author | jak1 <jak1@themanaworld.org> | 2022-12-23 13:43:49 +0100 |
---|---|---|
committer | jak1 <jak1@themanaworld.org> | 2022-12-23 13:43:49 +0100 |
commit | f5262e685180db2626dfb2015ba05f4cee4dfd32 (patch) | |
tree | 6d863ea8fcf532ace7d21438f28cc0c9f1fcf1aa | |
parent | 957c8d3d15ac5c0ae84e2e4a2945f182d88379c2 (diff) | |
download | mv-f5262e685180db2626dfb2015ba05f4cee4dfd32.tar.gz mv-f5262e685180db2626dfb2015ba05f4cee4dfd32.tar.bz2 mv-f5262e685180db2626dfb2015ba05f4cee4dfd32.tar.xz mv-f5262e685180db2626dfb2015ba05f4cee4dfd32.zip |
added local linting to build.sh
-rw-r--r-- | .gitignore | 7 | ||||
-rwxr-xr-x | build.sh | 43 |
2 files changed, 39 insertions, 11 deletions
diff --git a/.gitignore b/.gitignore index 173168e68..8261596c7 100644 --- a/.gitignore +++ b/.gitignore @@ -166,7 +166,14 @@ gmon.out .idea cmake-build-* +# vscode +.vscode + # Nintendo Switch port src/manaplus.nacp src/manaplus.nro src/resources/image/image.h.gch + +# linters +mplint +cpplint.py
\ No newline at end of file @@ -1,16 +1,37 @@ #!/bin/bash +# ./build.sh | builds the project without linting +# ./build.sh lint | builds the project with linting (src, data, po) +# ./build.sh lintonly | just linting (src, data, po) + dir=`pwd` -autoreconf -i -./configure --prefix=$dir/run \ ---datadir=$dir/run/share/games \ ---bindir=$dir/run/bin \ ---mandir=$dir/run/share/man $* +if [[ ! -d "${dir}/src" ]]; then + echo "you can only build in the root directory of the project." + exit 1 +fi + +if [[ $1 == lin* ]]; then + if [[ ! -d "logs" ]]; then + mkdir -p logs + fi + echo "that can take a while, go make some coffee, tea... build a house, watch some movies... ^^'" + ./tools/ci/jobs/mplint.sh src | tee logs/mplint_src.log + ./tools/ci/jobs/mplint.sh po | tee logs/mplint_po.log + ./tools/ci/jobs/mplint.sh data | tee logs/mplint_data.log + ./tools/ci/jobs/cpplint.sh | tee logs/cpplint.log +fi +if [[ $1 != lintonly ]]; then + autoreconf -i + ./configure --prefix=$dir/run \ + --datadir=$dir/run/share/games \ + --bindir=$dir/run/bin \ + --mandir=$dir/run/share/man $* -cd po -make update-gmo -cd .. -make -mkdir run -make install
\ No newline at end of file + cd po + make update-gmo + cd .. + make + mkdir run + make install +fi
\ No newline at end of file |