aboutsummaryrefslogtreecommitdiffstats
path: root/mk-pot
diff options
context:
space:
mode:
authorBarry Jackson <barjac@mageia.org>2023-01-29 11:40:02 +0000
committerBarry Jackson <barjac@mageia.org>2023-01-29 11:40:02 +0000
commit3678c975311ec9826f7a2b506ba7fbd76aec6f3b (patch)
tree7e199b5f6605213acec5464e3191f28c6eaf41f7 /mk-pot
parent1f32de6b5b93258660ef6f0928a806b4a30b33af (diff)
downloadremove-old-kernels-3678c975311ec9826f7a2b506ba7fbd76aec6f3b.tar
remove-old-kernels-3678c975311ec9826f7a2b506ba7fbd76aec6f3b.tar.gz
remove-old-kernels-3678c975311ec9826f7a2b506ba7fbd76aec6f3b.tar.bz2
remove-old-kernels-3678c975311ec9826f7a2b506ba7fbd76aec6f3b.tar.xz
remove-old-kernels-3678c975311ec9826f7a2b506ba7fbd76aec6f3b.zip
fix typo and str quoting
Diffstat (limited to 'mk-pot')
-rwxr-xr-xmk-pot12
1 files changed, 6 insertions, 6 deletions
diff --git a/mk-pot b/mk-pot
index 674b283..9c7087d 100755
--- a/mk-pot
+++ b/mk-pot
@@ -19,24 +19,24 @@ isdupe=1
done
# Dupe not found so increment line index and add string to check array
((x++))
- rawarray[$x]="$1"
+ rawarray[x]="$1"
return $isdupe
}
# Main script starts here
rawarray=(); x=0 ; y=0
-# Get raw i18n strings (max two per script line)
+# Get raw i18n strings
while IFS='' read -r line; do
if echo "$line"|grep -q '(i18n'; then
# Look for up to 4 occurrences of "$(i18n" in one script line and extract raw text for each
for ((i=2;i<5;i++)); do
idstr="$(echo "$line"|grep i18n|sed "s/\$(i18n/@/g"|cut -d@ -f${i}|cut -d\" -f2| sed 's/").*//')"
- if [[ ${#idstr} > 0 ]]; then
+ if (( ${#idstr} > 0 )); then
# Check it is not dupe
if ! chk_dupe "$idstr"; then
# Output line
IFS=''
- echo -e "msgid \""$idstr"\"\nmsgstr \"\"\n" >> $outpot
+ echo -e "msgid \"""$idstr""\"\nmsgstr \"\"\n" >> $outpot
fi
else
break
@@ -53,6 +53,6 @@ sed -i "s/POT-Creation-Date: /&$(date '+%F %R%z')/" $outpot
# Update po files with any string changes from the pot file
echo "Updating *.po files with any string changes"
-pushd po
+pushd po || exit 1
make update-po
-popd
+popd || exit 1