mirror of
https://github.com/mpv-player/mpv
synced 2025-02-21 23:36:58 +00:00
TOOLS: shellcheck: quote variable expansions
This commit is contained in:
parent
45e2345a7f
commit
11c044aa48
@ -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" ;
|
||||
|
@ -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."
|
||||
|
12
version.sh
12
version.sh
@ -21,18 +21,18 @@ done
|
||||
# Extract revision number from file used by daily tarball snapshots
|
||||
# or from "git describe" output
|
||||
git_revision=$(cat snapshot_version 2> /dev/null)
|
||||
test $git_revision || test ! -e .git || git_revision=$(git rev-parse --short HEAD)
|
||||
test $git_revision && git_revision=git-$git_revision
|
||||
test "$git_revision" || test ! -e .git || git_revision="$(git rev-parse --short HEAD)"
|
||||
test "$git_revision" && git_revision="git-$git_revision"
|
||||
version="$git_revision"
|
||||
|
||||
# releases extract the version number from the VERSION file
|
||||
releaseversion=$(cat VERSION 2> /dev/null)
|
||||
if test $releaseversion ; then
|
||||
test $version && version="-$version"
|
||||
releaseversion="$(cat VERSION 2> /dev/null)"
|
||||
if test "$releaseversion" ; then
|
||||
test "$version" && version="-$version"
|
||||
version="$releaseversion$version"
|
||||
fi
|
||||
|
||||
test $version || version=UNKNOWN
|
||||
test "$version" || version=UNKNOWN
|
||||
|
||||
VERSION="${version}${extra}"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user