From 542ed04a905127d13e69b8e4b848ae1c47b2be4f Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 17 Jan 2022 14:09:42 -0800 Subject: [PATCH] buildsystem: update translation script Running this on a different system I found a few problems... Signed-off-by: Dirk Hohndel --- scripts/updatetranslationsource.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/scripts/updatetranslationsource.sh b/scripts/updatetranslationsource.sh index 2627dd8a7..1cf6f4620 100755 --- a/scripts/updatetranslationsource.sh +++ b/scripts/updatetranslationsource.sh @@ -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