1616
1717set -e
1818
19+ export SRCDIR=$PWD
20+
1921action=$1
2022
2123case " $action " in
@@ -28,6 +30,8 @@ pull|push|update)
2830esac
2931
3032cleanup () {
33+ cd $SRCDIR
34+
3135 if [ -f i18n/backup.tar ]; then
3236 echo Restoring files...
3337 tar -xf i18n/backup.tar
@@ -36,7 +40,7 @@ cleanup() {
3640
3741 echo Removing temporary files
3842 rm -rf python/tmp python/plugins/processing/tmp python/plugins/* /tmp qgis_ts.pro
39- find . \( -name " *-i18n.ui" -o -name numerus -i18n.cpp \) -delete
43+ find src python \( -name " *-i18n.ui" -o -name " * -i18n.cpp" -o -name " *-i18n.ts " \) -delete
4044
4145 trap " " EXIT
4246}
@@ -45,6 +49,10 @@ export QT_SELECT=5
4549
4650PATH=$QTDIR /bin:$PATH
4751
52+ if type cygpath > /dev/null 2>&1 ; then
53+ SRCDIR=$( cygpath -am $SRCDIR )
54+ fi
55+
4856if type qmake-qt5 > /dev/null 2>&1 ; then
4957 QMAKE=qmake-qt5
5058else
@@ -116,7 +124,7 @@ if [ $action = push ]; then
116124 cp i18n/qgis_en.ts /tmp/qgis_en.ts-downloaded
117125 perl scripts/ts-clear.pl # reset English translations
118126elif [ $action = pull ]; then
119- rm i18n/qgis_* .ts
127+ rm -f i18n/qgis_* .ts
120128
121129 echo Pulling new translations...
122130 if [ " $# " -gt 0 ]; then
@@ -163,12 +171,14 @@ mkdir -p python/plugins/processing/tmp
163171perl scripts/processing2ui.pl python/plugins/processing/tmp
164172
165173echo Updating appinfo files
166- python scripts/appinfo2ui.py > src/app/appinfo-i18n.ui
174+ python3 scripts/appinfo2ui.py > src/app/appinfo-i18n.ui
167175
168176echo Creating qmake project file
169- $QMAKE -project -o qgis_ts.pro -nopwd $PWD /src $PWD /python $PWD /i18n $textcpp
177+ $QMAKE -project -o qgis_ts.pro -nopwd $SRCDIR /src $SRCDIR /python $SRCDIR /i18n $textcpp
178+
179+ QT_INSTALL_HEADERS=$( qmake -query QT_INSTALL_HEADERS)
170180
171- echo " TR_EXCLUDE = $( qmake -query QT_INSTALL_HEADERS) /*" >> qgis_ts.pro
181+ echo " TR_EXCLUDE = ${ QT_INSTALL_HEADERS% } /*" >> qgis_ts.pro
172182
173183echo Updating translations
174184$LUPDATE -no-ui-lines -no-obsolete -locations absolute -verbose qgis_ts.pro
0 commit comments