From 8dc00022f485be3ce075b8646e48b3f1f72b10fd Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 13 Dec 2016 14:44:10 +0200 Subject: [PATCH] Redesign lupdate.sh script. Speed up pull time up to 4 times. --HG-- branch : develop --- scripts/lupdate.sh | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/scripts/lupdate.sh b/scripts/lupdate.sh index be43a2756..671469e2d 100755 --- a/scripts/lupdate.sh +++ b/scripts/lupdate.sh @@ -1,10 +1,28 @@ -#!/bin/sh +#!/bin/bash # Run this script if you want to find and update all strings in the code. # lupdate doesn't work with recursive *.pro file and without direct pointing to correct *.pro file just update exists strings in code. # Please, run this script from folder /scripts. +start=$(date +%s) + # Download all translations from transifex.com. -tx pull --mode=developer -f -s --skip +cd ../share/translations +RESOURCES=`find . -regextype sed -regex ".*/measurements_p[0-9]\{1,2\}\.ts"` +cd ../../scripts + +NUMBER=( $RESOURCES ) +NUMBER=${#NUMBER[@]} + +for ((i=0;i