diff options
Diffstat (limited to 'build.sh')
-rwxr-xr-x | build.sh | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -8,6 +8,20 @@ BUILDDIR="build" DIR=$(pwd) +for OPTION in "$@" +do + if [[ "$OPTION" == "--clean" ]] + then + rm -r "$BUILDDIR" + elif [[ "$OPTION" == "--update-translations" ]] + then + CMAKE_ARGS="$CMAKE_ARGS -DUPDATE_TRANSLATIONS:BOOL=ON" + else + echo "usage: $SCRIPTNAME [--clean] [--update-translations]" >&2 + exit 1 + fi +done + if [[ ! -f "$DIR"/"$SRCDIR"/CMakeLists.txt ]] then echo "$SRCDIR/CMakeLists.txt not found" >&2 @@ -26,6 +40,6 @@ fi mkdir -p "$BUILDDIR" cd "$BUILDDIR" -cmake "$DIR"/"$SRCDIR"/ && make clean && make -j $NCORES +cmake $CMAKE_ARGS "$DIR"/"$SRCDIR"/ && make -j $NCORES cd "$DIR" |