summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Grandin <grandinp@gmail.com>2018-09-04 10:26:49 -0700
committerPierre Grandin <grandinp@gmail.com>2018-09-04 10:26:49 -0700
commitf787aadcf3198c9421015101baa726745dbc2f67 (patch)
tree8089e11e02ed9a5caa1e50a3dd3619181112566d
parent68b23fe306e78ec324b4f677ea9ac754a8013aba (diff)
downloadnavit-f787aadcf3198c9421015101baa726745dbc2f67.tar.gz
Making CodeFactor happier
-rw-r--r--scripts/import_translation.sh18
1 files changed, 9 insertions, 9 deletions
diff --git a/scripts/import_translation.sh b/scripts/import_translation.sh
index 11f100297..c7e1e4251 100644
--- a/scripts/import_translation.sh
+++ b/scripts/import_translation.sh
@@ -8,8 +8,8 @@ if [[ $1 == "" ]]; then
exit
fi
-id=`echo $1|cut -d'/' -f4`
-po=`echo $1|cut -d'/' -f5|cut -c 13-`
+id=$(echo $1|cut -d'/' -f4)
+po=$(echo $1|cut -d'/' -f5|cut -c 13-)
rm -rf navit
git clone git@github.com:navit-gps/navit.git
@@ -21,16 +21,16 @@ wget $1 -O po/import_queue/$po
# Let's fix the headers of the .po files in the import queue
for i in po/import_queue/*.po; do
- b=`basename $i`;
- po=${b#*-};
+ b=$(basename $i)
+ po=${b#*-}
code=${po%.*}
git checkout -b i18n/$code || exit -1
- lname=`head -n1 ${i} | sed 's/# \(.*\) translation.\{0,1\} for navit/\1/'`
+ lname=$(head -n1 ${i} | sed 's/# \(.*\) translation.\{0,1\} for navit/\1/')
if [[ $lname == "" ]]; then
echo "Cannot find the language name in the header of $i"
exit 1
fi
- d=`date +"%Y"`
+ d=$(date +"%Y")
echo "# ${lname} translations for navit" > po/${po}.header
echo "# Copyright (C) 2006-${d} The Navit Team" >> po/${po}.header
echo "# This file is distributed under the same license as the navit package." >> po/${po}.header
@@ -38,10 +38,10 @@ for i in po/import_queue/*.po; do
# Build a clean list of the contributors
IFS=$'\n'
echo "Downloading https://translations.launchpad.net/navit/trunk/+pots/navit/${code}/+details"
- contributors=`wget -q https://translations.launchpad.net/navit/trunk/+pots/navit/${code}/+details -O - | egrep '^ <a href=".+?" class="sprite person">'`
+ contributors=$(wget -q https://translations.launchpad.net/navit/trunk/+pots/navit/${code}/+details -O - | egrep '^ <a href=".+?" class="sprite person">')
for user in $contributors; do
- url=`echo $user|cut -d'"' -f2`
- name=`echo $user|cut -d'>' -f2|cut -d'<' -f1`
+ url=$(echo $user|cut -d'"' -f2)
+ name=$(echo $user|cut -d'>' -f2|cut -d'<' -f1)
echo "# $name $url" >> po/${po}.header
done
echo '' >> po/${po}.header