commit f5c96d71fac2302a810a4b8b8179af1dcf0ca595 parent 5c3a8343b3bf7e853e0cec0f1e4e22c14fb01ccc Author: Riaz <riaz@riazj.com> Date: Tue, 9 Sep 2025 11:49:26 -0700 Shorten script Diffstat:
M | .local/bin/new-article | | | 5 | ++--- |
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/.local/bin/new-article b/.local/bin/new-article @@ -6,10 +6,9 @@ error() { cd ~/repos/riazj.com/articles -gitstat="$(git status -s . | grep "^??")" -[ -z "$gitstat" ] && error "no new articles" - +gitstat="$(git status -s . | grep "^??")" || error "no new articles" article="${gitstat#* }" + [ "$(printf "%s\n" "$article" | wc -l)" -ne 1 ] && error "found more than one article"