projects
/
openwrt
/
staging
/
xback.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
826bb13
)
base-files: upgrade: add vn and variants
author
Yousong Zhou
<
[email protected]
>
Tue, 10 Nov 2020 13:30:29 +0000
(21:30 +0800)
committer
Yousong Zhou
<
[email protected]
>
Wed, 11 Nov 2020 13:29:55 +0000
(21:29 +0800)
To be used with in the following pattern
vn "Remaining: "
for p in $xx; do
_vn "$p"
done
_v
Signed-off-by: Yousong Zhou <
[email protected]
>
package/base-files/files/lib/upgrade/common.sh
patch
|
blob
|
history
diff --git
a/package/base-files/files/lib/upgrade/common.sh
b/package/base-files/files/lib/upgrade/common.sh
index 2ae83f5bfb545d078efc2fa129b35c1cb46b0d2d..0f251993652f1be254847dcfc8573d28e47acde4 100644
(file)
--- a/
package/base-files/files/lib/upgrade/common.sh
+++ b/
package/base-files/files/lib/upgrade/common.sh
@@
-63,8
+63,20
@@
ask_bool() {
[ "$answer" -gt 0 ]
}
+_v() {
+ [ -n "$VERBOSE" ] && [ "$VERBOSE" -ge 1 ] && echo "$*" >&2
+}
+
+_vn() {
+ [ -n "$VERBOSE" ] && [ "$VERBOSE" -ge 1 ] && echo -n "$*" >&2
+}
+
v() {
- [ -n "$VERBOSE" ] && [ "$VERBOSE" -ge 1 ] && echo "$(date) upgrade: $@" >&2
+ _v "$(date) upgrade: $@"
+}
+
+vn() {
+ _vn "$(date) upgrade: $@"
}
json_string() {