From f2cadb2a5fdd56c1d44bf9743303f3fef08ebfad Mon Sep 17 00:00:00 2001 From: kaotisk Date: Tue, 5 Sep 2023 02:28:38 +0300 Subject: Added a new option/shortcut to rebase one zblock ago --- bin/ak-zchain-rebase | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/bin/ak-zchain-rebase b/bin/ak-zchain-rebase index b7b0a76..3115083 100755 --- a/bin/ak-zchain-rebase +++ b/bin/ak-zchain-rebase @@ -43,11 +43,13 @@ rebase (){ echo "Rebase was successful" exit 0 } -if [ ! -z $1 ] && [ ! -z $2 ]; then - case $1 in - rebase) rebase $2; exit;; - * ) usage;; - esac +if [ ! -z $1 ] ; then +#&& [ ! -z $2 ] + case $1 in + rebase) if [ ! -z $2 ]; then rebase $2; else exit 1; fi;; + rebase-back-one) rebase "`ak-enter -l 2 | jq -r '.[1].zblock'`" ; exit ;; + * ) usage;; + esac else usage fi -- cgit v1.2.3