Skip to content

Commit

Permalink
buildsystem: update translation script
Browse files Browse the repository at this point in the history
Running this on a different system I found a few problems...

Signed-off-by: Dirk Hohndel <[email protected]>
  • Loading branch information
dirkhh committed Jan 17, 2022
1 parent 1af4032 commit 542ed04
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions scripts/updatetranslationsource.sh
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 542ed04

Please sign in to comment.