summaryrefslogtreecommitdiffstats
path: root/build.sh
diff options
context:
space:
mode:
authorJan Darmochwal2010-10-06 01:35:05 +0200
committerJan Darmochwal2010-10-06 01:35:05 +0200
commitbf7453843683494b81dd70232a2093577db34289 (patch)
treefed26399810a9fa58b974c3d71a72e0c19cab74d /build.sh
parenthighlight previous session (diff)
downloadvmchooser-bf7453843683494b81dd70232a2093577db34289.tar.gz
vmchooser-bf7453843683494b81dd70232a2093577db34289.tar.xz
vmchooser-bf7453843683494b81dd70232a2093577db34289.zip
i18n support and German translation
Translation can be done with .ts-files in src/i18n/de.ts. The resulting .qm-files are stored as resources in the program binary. build.sh has a new option --update-translations that causes the .ts files to be updated
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh16
1 files changed, 15 insertions, 1 deletions
diff --git a/build.sh b/build.sh
index 69041c0..7a515e4 100755
--- a/build.sh
+++ b/build.sh
@@ -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"