mirror of
https://github.com/mpv-player/mpv
synced 2025-02-26 02:05:31 +00:00
Use = instead of == for extra portability.
patch from NetBSD pkgsrc proxied by Sergey Svishchev, svs+mplayer grep ru git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20210 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
ed61b6f982
commit
0dc1093469
@ -74,7 +74,7 @@ printhead() {
|
|||||||
all_filenames() {
|
all_filenames() {
|
||||||
test "$_files" != "" && echo "$_files" && return
|
test "$_files" != "" && echo "$_files" && return
|
||||||
|
|
||||||
if [ "$_svn" == "no" ]; then
|
if [ "$_svn" = "no" ]; then
|
||||||
find . -type f \
|
find . -type f \
|
||||||
| grep -v "\.\#\|\~$\|\.depend\|\/\.svn\/\|config.mak\|^\./config\.h" \
|
| grep -v "\.\#\|\~$\|\.depend\|\/\.svn\/\|config.mak\|^\./config\.h" \
|
||||||
| grep -v "^\./version\.h\|\.o$\|\.a$\|configure.log\|^\./help_mp.h"
|
| grep -v "^\./version\.h\|\.o$\|\.a$\|configure.log\|^\./help_mp.h"
|
||||||
@ -225,7 +225,7 @@ done
|
|||||||
|
|
||||||
# Set heading color
|
# Set heading color
|
||||||
|
|
||||||
if [ "$_color" == "yes" ]; then
|
if [ "$_color" = "yes" ]; then
|
||||||
COLB="\e[36m"
|
COLB="\e[36m"
|
||||||
COLE="\e[m"
|
COLE="\e[m"
|
||||||
else
|
else
|
||||||
@ -237,7 +237,7 @@ fi
|
|||||||
|
|
||||||
filelist=`all_filenames`
|
filelist=`all_filenames`
|
||||||
|
|
||||||
if [ "$_showcont" == "yes" ]; then
|
if [ "$_showcont" = "yes" ]; then
|
||||||
_diffopts="-u"
|
_diffopts="-u"
|
||||||
_grepopts="-n -I"
|
_grepopts="-n -I"
|
||||||
else
|
else
|
||||||
@ -251,21 +251,21 @@ fi
|
|||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
if [ "$_spaces" == "yes" ]; then
|
if [ "$_spaces" = "yes" ]; then
|
||||||
printhead "checking for spaces in filenames ..."
|
printhead "checking for spaces in filenames ..."
|
||||||
find . | grep " "
|
find . | grep " "
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
if [ "$_extensions" == "yes" ]; then
|
if [ "$_extensions" = "yes" ]; then
|
||||||
printhead "checking for uppercase extensions ..."
|
printhead "checking for uppercase extensions ..."
|
||||||
echo $filelist | grep "\.[[:upper:]]\+$" | grep -v "\.S$"
|
echo $filelist | grep "\.[[:upper:]]\+$" | grep -v "\.S$"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
if [ "$_crlf" == "yes" ]; then
|
if [ "$_crlf" = "yes" ]; then
|
||||||
printhead "checking for MSDOS line endings ..."
|
printhead "checking for MSDOS line endings ..."
|
||||||
CR=`echo " " | tr ' ' '\015'`
|
CR=`echo " " | tr ' ' '\015'`
|
||||||
grep $_grepopts "$CR" $filelist
|
grep $_grepopts "$CR" $filelist
|
||||||
@ -273,28 +273,28 @@ fi
|
|||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
if [ "$_trailws" == "yes" ]; then
|
if [ "$_trailws" = "yes" ]; then
|
||||||
printhead "checking for trailing whitespace ..."
|
printhead "checking for trailing whitespace ..."
|
||||||
grep $_grepopts "[[:space:]]\+$" $filelist
|
grep $_grepopts "[[:space:]]\+$" $filelist
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
if [ "$_rcsid" == "yes" ]; then
|
if [ "$_rcsid" = "yes" ]; then
|
||||||
printhead "checking for missing RCS \$Id\$ or \$Revision\$ tags ..."
|
printhead "checking for missing RCS \$Id\$ or \$Revision\$ tags ..."
|
||||||
grep -L -I "\$\(Id\|Revision\)[[:print:]]\+\$" $filelist
|
grep -L -I "\$\(Id\|Revision\)[[:print:]]\+\$" $filelist
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
if [ "$_oll" == "yes" ]; then
|
if [ "$_oll" = "yes" ]; then
|
||||||
printhead "checking for overly long lines (over 79 characters) ..."
|
printhead "checking for overly long lines (over 79 characters) ..."
|
||||||
grep $_grepopts "^[[:print:]]\{80,\}$" $filelist
|
grep $_grepopts "^[[:print:]]\{80,\}$" $filelist
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
if [ "$_charset" == "yes" ]; then
|
if [ "$_charset" = "yes" ]; then
|
||||||
printhead "checking bad charsets ..."
|
printhead "checking bad charsets ..."
|
||||||
for I in $filelist ; do
|
for I in $filelist ; do
|
||||||
case "$I" in
|
case "$I" in
|
||||||
@ -311,7 +311,7 @@ fi
|
|||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
if [ "$_stupid" == "yes" ]; then
|
if [ "$_stupid" = "yes" ]; then
|
||||||
printhead "checking for stupid code ..."
|
printhead "checking for stupid code ..."
|
||||||
|
|
||||||
# avoid false-positives in xpm files, docs, etc, only check .c and .h files
|
# avoid false-positives in xpm files, docs, etc, only check .c and .h files
|
||||||
|
Loading…
Reference in New Issue
Block a user