help3xsl/xhp2html.sh |   13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

New commits:
commit 3e535dfe206e106a7a06e39a8e9f5a7b6e5bc95c
Author: Olivier Hallot <olivier.hal...@libreoffice.org>
Date:   Wed Sep 20 17:09:40 2017 -0300

    Some better coding practice
    
    use $() in bash script
    
    Change-Id: Ia46e529bf2059a378b0f311ec2b6d5fc03e86f66
    Reviewed-on: https://gerrit.libreoffice.org/42566
    Reviewed-by: Olivier Hallot <olivier.hal...@libreoffice.org>
    Tested-by: Olivier Hallot <olivier.hal...@libreoffice.org>

diff --git a/help3xsl/xhp2html.sh b/help3xsl/xhp2html.sh
index 105a86049..9e90a0aa2 100755
--- a/help3xsl/xhp2html.sh
+++ b/help3xsl/xhp2html.sh
@@ -35,7 +35,7 @@ function convert2HTML() {
 xsltparm='--stringparam fileTree '$6' --stringparam local '$5' --stringparam 
Language '$3' --stringparam productversion '$4' --stringparam root '$1'/'
 
 echo 'Conversion to HTML started for '$3
-for filep in `find $1/text -name "*.xhp"`
+for filep in $(find $1/text -name "*.xhp")
 do
 DIR=${filep##*text/}
 name=${DIR:0:-3}
@@ -49,7 +49,7 @@ done
 #
 ###########################################
 
-treePOFile=`mktemp`
+treePOFile=$(mktemp)
 echo $root/translations/source/$3/helpcontent2/source/auxiliary.po > 
$treePOFile
 
 ALL_TREE='sbasic.tree  scalc.tree  schart.tree  shared.tree  simpress.tree  
smath.tree  swriter.tree'
@@ -65,8 +65,8 @@ xsltparm='--stringparam lang '$3' --stringparam 
productversion '$4
 for tree in $ALL_TREE
 do
 treeSourceFile=$root'/helpcontent2/source/auxiliary/'$tree
-treeTemp1=`mktemp`
-treeTemp2=`mktemp`
+treeTemp1=$(mktemp)
+treeTemp2=$(mktemp)
 
 "${exedir}/treex" -l $3 -i $treeSourceFile -m $treePOFile -o $treeTemp1 -r 
$xhpFiles
 
@@ -97,8 +97,7 @@ fileTree='/home/tdf/git/core/helpcontent2/help3xsl/html/'
 rootHelpex=/home/tdf/git/core
 
 ALL_LANGS='en-US am ar ast bg bn bn-IN bo bs ca ca-valencia cs da de dz el 
en-GB en-ZA eo es et eu fi fr gl gu he hi hr hu id is it ja ka km ko lo lt lv 
mk nb ne nl nn om pl pt-BR pt ro ru sid si sk sl sq sv ta tg tr ug uk vi zh-CN 
zh-TW'
-
-here=`pwd`
+here=$(pwd)
 root=$(realpath "$here/../..")
 
 rm -rf $here/l10n
@@ -192,7 +191,7 @@ xhpfiles=`mktemp`
 find $translations -type f >$pofiles
 
 # For each po file
-for ff in `cat $pofiles`
+for ff in $(cat $pofiles)
 do
     echo 'Processing po file: '$ff
     potemp=`mktemp`
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to