use grep -c instead of grep | wc -l
This commit is contained in:
parent
0e8435d889
commit
04a58ffa04
2 changed files with 2 additions and 3 deletions
|
@ -1 +0,0 @@
|
||||||
0
|
|
|
@ -115,7 +115,7 @@ build() {
|
||||||
gen_makefile
|
gen_makefile
|
||||||
[ ! -d "${OBJDIR}" ] && mkdir "${OBJDIR}"
|
[ ! -d "${OBJDIR}" ] && mkdir "${OBJDIR}"
|
||||||
export_vars
|
export_vars
|
||||||
make -f "${MAKEFILE}" -e "${TARGET}" -n | grep "^${CC}" | wc -l > .cbuild_prog.tmp
|
make -f "${MAKEFILE}" -e "${TARGET}" -n | grep -c "^${CC}" > .cbuild_prog.tmp
|
||||||
if [ "$(cat .cbuild_prog.tmp)" = 0 ]; then
|
if [ "$(cat .cbuild_prog.tmp)" = 0 ]; then
|
||||||
info "Target [0m${TARGET}[34m up to date"
|
info "Target [0m${TARGET}[34m up to date"
|
||||||
rm .cbuild_prog.tmp
|
rm .cbuild_prog.tmp
|
||||||
|
@ -157,7 +157,7 @@ dry_run() {
|
||||||
__progress__() {
|
__progress__() {
|
||||||
ntargets=$(cat .cbuild_prog.tmp)
|
ntargets=$(cat .cbuild_prog.tmp)
|
||||||
export_vars
|
export_vars
|
||||||
rtargets="$(make -f "${MAKEFILE}" -e "${TARGET}" -n | grep "^${CC}" | wc -l)"
|
rtargets="$(make -f "${MAKEFILE}" -e "${TARGET}" -n | grep -c "^${CC}")"
|
||||||
targetno=$((${ntargets} - ${rtargets} + 1))
|
targetno=$((${ntargets} - ${rtargets} + 1))
|
||||||
if [ "${1}" = "object" ]; then
|
if [ "${1}" = "object" ]; then
|
||||||
printf '[35;1m[%3d/%d][0m ' "${targetno}" "${ntargets}"
|
printf '[35;1m[%3d/%d][0m ' "${targetno}" "${ntargets}"
|
||||||
|
|
Loading…
Reference in a new issue