Kaydet (Commit) 020e1bff authored tarafından Yeliz Taneroğlu's avatar Yeliz Taneroğlu Kaydeden (comit) Chris Sherlock

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/37549Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarChris Sherlock <chris.sherlock79@gmail.com>
üst e20f6464
...@@ -22,19 +22,19 @@ SAL_ENABLE_FILE_LOCKING=1 ...@@ -22,19 +22,19 @@ SAL_ENABLE_FILE_LOCKING=1
export SAL_ENABLE_FILE_LOCKING export SAL_ENABLE_FILE_LOCKING
# resolve installation directory # resolve installation directory
sd_cwd=`pwd` sd_cwd=$(pwd)
sd_res=$0 sd_res=$0
while [ -h "$sd_res" ] ; do while [ -h "$sd_res" ] ; do
cd "`dirname "$sd_res"`" cd "$(dirname "$sd_res")"
sd_basename=`basename "$sd_res"` sd_basename=$(basename "$sd_res")
sd_res=`ls -l "$sd_basename" | sed "s/.*$sd_basename -> //g"` sd_res=$(ls -l "$sd_basename" | sed "s/.*$sd_basename -> //g")
done done
cd "`dirname "$sd_res"`" cd "$(dirname "$sd_res")"
sd_prog=`pwd` sd_prog=$(pwd)
cd "$sd_cwd" cd "$sd_cwd"
# this is a temporary hack until we can live with the default search paths # 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) NetBSD|OpenBSD|FreeBSD|DragonFly)
LD_LIBRARY_PATH=$sd_prog${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} LD_LIBRARY_PATH=$sd_prog${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
JAVA_HOME=$(javaPathHelper -h libreoffice-java 2> /dev/null) JAVA_HOME=$(javaPathHelper -h libreoffice-java 2> /dev/null)
...@@ -51,7 +51,7 @@ esac ...@@ -51,7 +51,7 @@ esac
#collect all bootstrap variables specified on the command line #collect all bootstrap variables specified on the command line
#so that they can be passed as arguments to javaldx later on #so that they can be passed as arguments to javaldx later on
for arg in $@ for arg in "$@"
do do
case "$arg" in case "$arg" in
-env:*) BOOTSTRAPVARS=$BOOTSTRAPVARS" ""$arg";; -env:*) BOOTSTRAPVARS=$BOOTSTRAPVARS" ""$arg";;
...@@ -62,10 +62,10 @@ done ...@@ -62,10 +62,10 @@ done
# extend the ld_library_path for java: javaldx checks the sofficerc for us # extend the ld_library_path for java: javaldx checks the sofficerc for us
if [ -x "$sd_prog/javaldx" ] ; then if [ -x "$sd_prog/javaldx" ] ; then
my_path=`"$sd_prog/javaldx" $BOOTSTRAPVARS \ my_path=$("$sd_prog/javaldx" "$BOOTSTRAPVARS" \
"-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc"` "-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc")
if [ -n "$my_path" ] ; then if [ -n "$my_path" ] ; then
sd_platform=`uname -s` sd_platform=$(uname -s)
case $sd_platform in case $sd_platform in
AIX) AIX)
LIBPATH=$my_path${LIBPATH:+:$LIBPATH} LIBPATH=$my_path${LIBPATH:+:$LIBPATH}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment