From 11c044aa48e4dc14c86cdf37591115a2590e48f8 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Mon, 15 Sep 2014 20:50:43 -0400 Subject: TOOLS: shellcheck: quote variable expansions --- TOOLS/gen-x11-icon.sh | 4 ++-- TOOLS/idet.sh | 30 +++++++++++++++--------------- 2 files changed, 17 insertions(+), 17 deletions(-) (limited to 'TOOLS') diff --git a/TOOLS/gen-x11-icon.sh b/TOOLS/gen-x11-icon.sh index 0faf2c1f5e..550e9c354d 100644 --- a/TOOLS/gen-x11-icon.sh +++ b/TOOLS/gen-x11-icon.sh @@ -5,8 +5,8 @@ conv() { echo - identify -format "icon: %w %h" $1 - convert $1 -depth 8 rgba:- + identify -format "icon: %w %h" "$1" + convert "$1" -depth 8 rgba:- } (echo "# File generated by gen-x11-icon.sh" ; diff --git a/TOOLS/idet.sh b/TOOLS/idet.sh index 898ae0cd9c..50b5bbcf83 100755 --- a/TOOLS/idet.sh +++ b/TOOLS/idet.sh @@ -1,14 +1,14 @@ #!/bin/sh -: ${MPV:=mpv} -: ${ILDETECT_MPV:=$MPV} -: ${ILDETECT_MPV:=$MPV} -: ${ILDETECT_MPVFLAGS:=--start=35% --length=35} -: ${ILDETECT_DRY_RUN:=} -: ${ILDETECT_QUIET:=} -: ${ILDETECT_RUN_INTERLACED_ONLY:=} -: ${ILDETECT_FORCE_RUN:=} -: ${MAKE:=make} +: "${MPV:=mpv}" +: "${ILDETECT_MPV:=$MPV}" +: "${ILDETECT_MPV:=$MPV}" +: "${ILDETECT_MPVFLAGS:=--start=35% --length=35}" +: "${ILDETECT_DRY_RUN:=}" +: "${ILDETECT_QUIET:=}" +: "${ILDETECT_RUN_INTERLACED_ONLY:=}" +: "${ILDETECT_FORCE_RUN:=}" +: "${MAKE:=make}" # exit status: # 0 progressive @@ -47,22 +47,22 @@ judge() interlaced=$((bff + tff)) determined=$((interlaced + progressive)) - if [ $undetermined -gt $determined ] || [ $determined -lt 250 ]; then + if [ "$undetermined" -gt "$determined" ] || [ "$determined" -lt 250 ]; then echo >&2 "ERROR: Less than 50% or 250 frames are determined." [ -n "$ILDETECT_FORCE_RUN" ] || exit 8 echo >&2 "Assuming interlacing." - if [ $tff -gt $((bff * 10)) ]; then + if [ "$tff" -gt $((bff * 10)) ]; then verdict=interlaced-tff - elif [ $bff -gt $((tff * 10)) ]; then + elif [ "$bff" -gt $((tff * 10)) ]; then verdict=interlaced-bff else verdict=interlaced fi - elif [ $((interlaced * 20)) -gt $progressive ]; then + elif [ $((interlaced * 20)) -gt "$progressive" ]; then # At least 5% of the frames are interlaced! - if [ $tff -gt $((bff * 10)) ]; then + if [ "$tff" -gt $((bff * 10)) ]; then verdict=interlaced-tff - elif [ $bff -gt $((tff * 10)) ]; then + elif [ "$bff" -gt $((tff * 10)) ]; then verdict=interlaced-bff else echo >&2 "ERROR: Content is interlaced, but can't determine field order." -- cgit v1.2.3