buildsystem: update translation script

Running this on a different system I found a few problems...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2022-01-17 14:09:42 -08:00
parent 1af4032dad
commit 542ed04a90

View file

@ -1,6 +1,11 @@
#!/bin/bash
#
# ugly hack - makes way too many assumptions about my layout
# ugly hack - this does NOT work with the normal layout of our sources
# the build dir needs to be outside of the src/subsurface tree for this to work
# in order to run this I have this layout
# .../src/subsurface
# .../src/subsurface-build
# and then run this in that latter directory
if [[ ! -d translations || ! -f translations/subsurface_source.qm ]] ; then
echo Start from the build folder
@ -20,9 +25,11 @@ git status | grep "Changes not staged for commit" 2>/dev/null && echo "tree not
git status | grep "Changes to be committed" 2>/dev/null && echo "tree not clean" && exit 1
# now remove the translations and remove access to the kirigami sources
# and any old sources under tmp
# and any old sources under tmp as well as build directories inside the source tree
chmod 000 mobile-widgets/3rdparty
chmod 000 tmp
[ -d tmp ] && chmod 000 tmp
[ -d build ] && chmod 000 build
[ -d build-mobile ] && chmod 000 build-mobile
rm translations/subsurface_source.ts
# enable creating the translation strings
@ -53,7 +60,9 @@ git reset --hard
# now enable access to kirigami again
chmod 755 mobile-widgets/3rdparty
chmod 755 tmp
[ -d tmp ] && chmod 755 tmp
[ -d build ] && chmod 755 build
[ -d build-mobile ] && chmod 755 build-mobile
# this really depends on my filesystem layout
# push sources to Transifex