Don't use `grep -e' without a reason to do so.

This commit is contained in:
Michał Górny 2010-11-02 09:05:16 +01:00
parent 09661479e0
commit b21ae5bd82

View File

@ -88,7 +88,7 @@ is_whole_dir_removed() {
elif [ ${SC_VCS} = hg ]; then elif [ ${SC_VCS} = hg ]; then
[ -z "$(hg status -madc "${1}")" ] [ -z "$(hg status -madc "${1}")" ]
elif [ ${SC_VCS} = cvs ]; then elif [ ${SC_VCS} = cvs ]; then
[ -z "$(cvs -Q status -R "${1}" 2>/dev/null | grep -e '^File:' | grep -v -e 'Status: Locally Removed$')" ] [ -z "$(cvs -Q status -R "${1}" 2>/dev/null | grep '^File:' | grep -v 'Status: Locally Removed$')" ]
fi fi
} }
@ -197,8 +197,8 @@ check_for_changes() {
elif [ ${SC_VCS} = svn ]; then elif [ ${SC_VCS} = svn ]; then
output=$(svn status -- "${@}") output=$(svn status -- "${@}")
elif [ ${SC_VCS} = cvs ]; then elif [ ${SC_VCS} = cvs ]; then
# `U' indicates a remote, incomming update. # `U' indicates a remote, incoming update.
output=$(cvs -n -q update -R -- "${@}" 2>/dev/null | grep -v -e '^U') output=$(cvs -n -q update -R -- "${@}" 2>/dev/null | grep -v '^U')
fi fi
[ -z "${output}" ] && return 1 [ -z "${output}" ] && return 1
@ -233,7 +233,7 @@ vcs_status() {
elif [ ${SC_VCS} = svn ]; then elif [ ${SC_VCS} = svn ]; then
svn status -- "${@}" svn status -- "${@}"
elif [ ${SC_VCS} = cvs ]; then elif [ ${SC_VCS} = cvs ]; then
cvs -n -q up -- "${@}" 2>/dev/null | grep -v -e '^U' cvs -n -q up -- "${@}" 2>/dev/null | grep -v '^U'
fi fi
} }