1 |
commit: 5d73c6b04ae06319ba5cc7bed9902249284494a1 |
2 |
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Dec 29 05:32:10 2017 +0000 |
4 |
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Dec 29 05:32:10 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/releng.git/commit/?id=5d73c6b0 |
7 |
|
8 |
catalyst-auto: add intermediate verbose, that prints the command, but not the output; -vv has old behavior |
9 |
|
10 |
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org> |
11 |
|
12 |
tools/catalyst-auto | 9 ++++++--- |
13 |
1 file changed, 6 insertions(+), 3 deletions(-) |
14 |
|
15 |
diff --git a/tools/catalyst-auto b/tools/catalyst-auto |
16 |
index cd26f969..02115d1c 100755 |
17 |
--- a/tools/catalyst-auto |
18 |
+++ b/tools/catalyst-auto |
19 |
@@ -77,9 +77,12 @@ run_cmd() { |
20 |
local logfile="$1" |
21 |
shift |
22 |
|
23 |
- if [ $verbose = 1 ]; then |
24 |
+ if [ $verbose = 2 ]; then |
25 |
echo "*** Running command: $*" |
26 |
"$@" 2>&1 | tee -a "${logfile}" |
27 |
+ elif [ $verbose = 1 ]; then |
28 |
+ echo "*** Running command: $*" |
29 |
+ "$@" &>> "${logfile}" |
30 |
else |
31 |
"$@" &>> "${logfile}" |
32 |
fi |
33 |
@@ -137,7 +140,7 @@ do |
34 |
shift |
35 |
;; |
36 |
-v|--verbose) |
37 |
- verbose=1 |
38 |
+ verbose=$(($verbose+1)) |
39 |
;; |
40 |
-k|--keep-tmpdir) |
41 |
keep_tmpdir=1 |
42 |
@@ -224,7 +227,7 @@ if [[ ${preclean} -eq 1 ]]; then |
43 |
mkdir "${TMPDIR}" |
44 |
fi |
45 |
|
46 |
-if [ ${verbose} = 1 ]; then |
47 |
+if [ ${verbose} -ge 1 ]; then |
48 |
echo "TMPDIR = ${TMPDIR}" |
49 |
echo "DATESTAMP = ${DATESTAMP}" |
50 |
echo "TIMESTAMP = ${TIMESTAMP}" |