aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-07-10 16:05:02 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-07-10 16:05:02 +1200
commit72ddc109a6a3ee37c3162cd45784d91747948ef6 (patch)
tree6e7a7f8f3c8040c045ca9aac80c73ec2c9fd7b49
parentMerge branch 'release/v2.0.0' (diff)
parentBump VERSION (diff)
downloadnwatch-72ddc109a6a3ee37c3162cd45784d91747948ef6.tar.gz
nwatch-72ddc109a6a3ee37c3162cd45784d91747948ef6.zip
Merge branch 'hotfix/v2.0.1'v2.0.1
* hotfix/v2.0.1: Bump VERSION Correct logic error in Awk filter
-rw-r--r--VERSION2
-rwxr-xr-xnwatch10
2 files changed, 7 insertions, 5 deletions
diff --git a/VERSION b/VERSION
index 227cea2..38f77a6 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.0.0
+2.0.1
diff --git a/nwatch b/nwatch
index c981fbc..e44da1e 100755
--- a/nwatch
+++ b/nwatch
@@ -71,16 +71,18 @@ done
# Write diff to stdout if it exists (not an error if it doesn't)
if [[ -r $diff ]] ; then
- awk '/^[-+]Not shown: / { next }
+ awk '
+/^[-+]Not shown: / { next }
/^[-+]/ { diff = 1 }
NF { lines[++l] = $0 }
function write() {
if (diff) {
- for (l in lines)
- print lines[l]
+ for (n = 1; n <= l; n++)
+ print lines[n]
print ""
+ diff = 0
}
- diff = l = 0
+ l = 0
}
!NF { write() }
END { write() }