[Libreoffice-commits] core.git: svx/source
Yeliz Taneroğlu
yeliztaneroglu at gmail.com
Sat May 20 09:30:08 UTC 2017
svx/source/gengal/gengal.sh | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
New commits:
commit 020e1bff16a7bb5f401a2547d211807acd7db0fb
Author: Yeliz Taneroğlu <yeliztaneroglu at gmail.com>
Date: Fri May 12 19:15:53 2017 +0300
tdf#105204: ShellCheck nitpicks for gengal.sh
Use $(STATEMENT) instead of legacy `STATEMENT`.
Double quote to prevent globbing and word splitting.
Double quote array expansions to avoid re-splitting elements.
Change-Id: I7fac5d187597aa37920754ed53be7bcc83603cee
Reviewed-on: https://gerrit.libreoffice.org/37549
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79 at gmail.com>
diff --git a/svx/source/gengal/gengal.sh b/svx/source/gengal/gengal.sh
index 7535e25b5c6b..8bab14678ff3 100755
--- a/svx/source/gengal/gengal.sh
+++ b/svx/source/gengal/gengal.sh
@@ -22,19 +22,19 @@ SAL_ENABLE_FILE_LOCKING=1
export SAL_ENABLE_FILE_LOCKING
# resolve installation directory
-sd_cwd=`pwd`
+sd_cwd=$(pwd)
sd_res=$0
while [ -h "$sd_res" ] ; do
- cd "`dirname "$sd_res"`"
- sd_basename=`basename "$sd_res"`
- sd_res=`ls -l "$sd_basename" | sed "s/.*$sd_basename -> //g"`
+ cd "$(dirname "$sd_res")"
+ sd_basename=$(basename "$sd_res")
+ sd_res=$(ls -l "$sd_basename" | sed "s/.*$sd_basename -> //g")
done
-cd "`dirname "$sd_res"`"
-sd_prog=`pwd`
+cd "$(dirname "$sd_res")"
+sd_prog=$(pwd)
cd "$sd_cwd"
# this is a temporary hack until we can live with the default search paths
-case "`uname -s`" in
+case "$(uname -s)" in
NetBSD|OpenBSD|FreeBSD|DragonFly)
LD_LIBRARY_PATH=$sd_prog${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
JAVA_HOME=$(javaPathHelper -h libreoffice-java 2> /dev/null)
@@ -51,7 +51,7 @@ esac
#collect all bootstrap variables specified on the command line
#so that they can be passed as arguments to javaldx later on
-for arg in $@
+for arg in "$@"
do
case "$arg" in
-env:*) BOOTSTRAPVARS=$BOOTSTRAPVARS" ""$arg";;
@@ -62,10 +62,10 @@ done
# extend the ld_library_path for java: javaldx checks the sofficerc for us
if [ -x "$sd_prog/javaldx" ] ; then
- my_path=`"$sd_prog/javaldx" $BOOTSTRAPVARS \
- "-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc"`
+ my_path=$("$sd_prog/javaldx" "$BOOTSTRAPVARS" \
+ "-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc")
if [ -n "$my_path" ] ; then
- sd_platform=`uname -s`
+ sd_platform=$(uname -s)
case $sd_platform in
AIX)
LIBPATH=$my_path${LIBPATH:+:$LIBPATH}
More information about the Libreoffice-commits
mailing list