[Libreoffice-commits] core.git: sysui/desktop
Yeliz Taneroğlu
yeliztaneroglu at gmail.com
Sat May 20 09:47:06 UTC 2017
sysui/desktop/share/apparmor.sh | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit 7bec7abd4c3d78e6a37f523f4fb599134ef51ca7
Author: Yeliz Taneroğlu <yeliztaneroglu at gmail.com>
Date: Fri May 12 18:26:56 2017 +0300
tdf#105204: ShellCheck nitpicks for apparmor.sh
Double quote to prevent globbing and word splitting.
Iterating over ls output is fragile. Use globs.
Change-Id: I156b472708049115e753ff2a51a44807c8af6b94
Reviewed-on: https://gerrit.libreoffice.org/37544
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79 at gmail.com>
diff --git a/sysui/desktop/share/apparmor.sh b/sysui/desktop/share/apparmor.sh
index 59803e1ae4db..cf554257cf72 100755
--- a/sysui/desktop/share/apparmor.sh
+++ b/sysui/desktop/share/apparmor.sh
@@ -37,10 +37,11 @@ INST_ROOT_FORMAT=${INST_ROOT_FORMAT////.}
#Need to escape / for sed
INST_ROOT_SED=${INST_ROOT////\\/}
-for filename in $(ls $PROFILESFROM)
+for filename in $PROFILESFROM
do
tourl=$INSTALLTO$INST_ROOT_FORMAT$filename
- sed "s/INSTDIR-/$INST_ROOT_SED/g" $PROFILESFROM$filename > $tourl
+ sed "s/INSTDIR-/$INST_ROOT_SED/g" "$PROFILESFROM""$filename" > "$tourl"
+ [[ -e $filename ]] || break
echo "$tourl"
done
More information about the Libreoffice-commits
mailing list