aboutsummaryrefslogtreecommitdiffstats
path: root/image
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2018-06-06 10:10:07 -0700
committerGerald Combs <gerald@wireshark.org>2018-06-07 18:11:12 +0000
commit4905983845dd64fc37c7bbaaa0e1f2dcc32f21f4 (patch)
tree04a725c2972c2b16afdd74cd07d5dc6abf00079b /image
parent0882e94cff6a6a5087bfaf3883c9842cb8f9d944 (diff)
More shellcheck checks and fixes.
Remove a libtool check while we're here. Change-Id: I813add2031480f34ce89f268b541f8939016c2c7 Reviewed-on: https://code.wireshark.org/review/28066 Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'image')
-rwxr-xr-ximage/stock_icons/svg-to-png.sh12
1 files changed, 7 insertions, 5 deletions
diff --git a/image/stock_icons/svg-to-png.sh b/image/stock_icons/svg-to-png.sh
index 27ac8b864c..39cbf9d1fb 100755
--- a/image/stock_icons/svg-to-png.sh
+++ b/image/stock_icons/svg-to-png.sh
@@ -80,8 +80,8 @@ for SIZE in 14x14 16x16 24x14 24x14 ; do
HEIGHT=${SIZE/*x/}
SIZE_DIR=${SIZE}
- TWO_X_WIDTH=`expr $WIDTH \* 2`
- TWO_X_HEIGHT=`expr $HEIGHT \* 2`
+ TWO_X_WIDTH=$(( WIDTH * 2 ))
+ TWO_X_HEIGHT=$(( HEIGHT * 2 ))
ONE_X_ARGS="--export-width=${WIDTH} --export-height=${HEIGHT}"
TWO_X_ARGS="--export-width=${TWO_X_WIDTH} --export-height=${TWO_X_HEIGHT}"
@@ -89,7 +89,7 @@ for SIZE in 14x14 16x16 24x14 24x14 ; do
cd $SIZE_DIR || exit 1
for ICON in $ICONS ; do
- set_source_svgs $ICON
+ set_source_svgs "$ICON"
if [ ! -f ${ONE_X_SVG} ] ; then
>&2 echo "Skipping ${ONE_X_SVG}"
@@ -99,12 +99,14 @@ for SIZE in 14x14 16x16 24x14 24x14 ; do
ONE_X_PNG=${ICON}.png
TWO_X_PNG=${ICON}@2x.png
- if [ $ONE_X_SVG -nt $ONE_X_PNG ] ; then
+ if [ $ONE_X_SVG -nt "$ONE_X_PNG" ] ; then
+ # shellcheck disable=SC2086
inkscape $COMMON_ARGS $ONE_X_ARGS \
--file="$PWD/$ONE_X_SVG" --export-png="$PWD/$ONE_X_PNG" || exit 1
fi
- if [ $TWO_X_SVG -nt $TWO_X_PNG ] ; then
+ if [ $TWO_X_SVG -nt "$TWO_X_PNG" ] ; then
+ # shellcheck disable=SC2086
inkscape $COMMON_ARGS $TWO_X_ARGS \
--file="$PWD/$TWO_X_SVG" --export-png="$PWD/$TWO_X_PNG" || exit 1
fi