diff options
author | Ben Boeckel <mathstuf@gmail.com> | 2014-09-15 20:50:43 -0400 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-09-16 17:32:33 +0200 |
commit | 11c044aa48e4dc14c86cdf37591115a2590e48f8 (patch) | |
tree | cdc898f04fc41f6fd8791b123f4db717a5093bda /TOOLS | |
parent | 45e2345a7f3e85c3e3c22944dda5fdb83c65ecc6 (diff) | |
download | mpv-11c044aa48e4dc14c86cdf37591115a2590e48f8.tar.bz2 mpv-11c044aa48e4dc14c86cdf37591115a2590e48f8.tar.xz |
TOOLS: shellcheck: quote variable expansions
Diffstat (limited to 'TOOLS')
-rw-r--r-- | TOOLS/gen-x11-icon.sh | 4 | ||||
-rwxr-xr-x | TOOLS/idet.sh | 30 |
2 files changed, 17 insertions, 17 deletions
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." |