Lines Matching +full:- +full:- +full:quiet
6 # SPDX-License-Identifier: Apache-2.0
12 # usage: check_known_checkpatch_issues.sh [-u]
13 # where: -u updates the known_checkpatch_issues db and commits it
14 # -q is the quiet mode (don't display the diff on stdout)
22 declare quiet=n
25 printf "usage: %s [-u][-q]\n" ${exe_name} >&2
30 exit -1
41 exit -1
47 declare -r optstr="quh"
51 q) quiet=y ;;
62 timestamp="${timestamp_bin} -u"
64 uid=$(id -u)
66 suffix=${uid}-${pid}-${ts}
67 checkpatch_results=/tmp/checkpatch.results-${suffix}
69 checkpatch_issues=/tmp/checkpatch_issues-${suffix}
71 --abbrev=8 \
72 --abbrev-commit \
75 commit_id_str=$(git log ${git_log_params} HEAD | head -n 1)
80 diff_file=/tmp/checkpatch.results.diff-${suffix}
81 diff -u ${known_checkpatch_issues} ${checkpatch_issues} > ${diff_file}
83 if [ ${quiet} = n ]; then
90 grep -v -E "^\-\-\-" | grep -v -E "^\-commit " | grep -E "^\-" | \
91 awk '{print $1}' | cut -d\- -f 2-) \
95 grep -v -E "^\-\-\-" | grep -v -E "^\-commit " | grep -E "^\-" | \
100 grep -v -E "^\+\+\+" | grep -v -E "^\+commit " | grep -E "^\+" | \
101 awk '{print $1}' | cut -d\+ -f 2-) \
105 grep -v -E "^\+\+\+" | grep -v -E "^\+commit " | grep -E "^\+" | \
110 declare -i num_plusses=${#plusses_num_err[@]}
111 declare -i num_minuses=${#minuses_num_err[@]}
112 declare -i test_num=${num_plusses}
113 while [ ${test_num} -gt 0 ]; do
114 test_num+=-1
116 declare -i i=${num_minuses}
117 while [ $i -gt 0 ]; do
118 i+=-1
122 if [ ${n_plus} -gt ${n_minus} ]; then
142 git commit -m "${msg}"