diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2023-09-05 02:28:38 +0300 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2023-09-05 02:28:38 +0300 |
commit | f2cadb2a5fdd56c1d44bf9743303f3fef08ebfad (patch) | |
tree | ec86b4b41d2dabe33fe769ed1e1e4d4b18486395 /bin/ak-zchain-rebase | |
parent | d976f0e3f2d4f7d3cce4867ca21ec86c29e4fdef (diff) | |
download | arching-kaos-tools-f2cadb2a5fdd56c1d44bf9743303f3fef08ebfad.tar.gz arching-kaos-tools-f2cadb2a5fdd56c1d44bf9743303f3fef08ebfad.tar.bz2 arching-kaos-tools-f2cadb2a5fdd56c1d44bf9743303f3fef08ebfad.zip |
Added a new option/shortcut to rebase one zblock ago
Diffstat (limited to 'bin/ak-zchain-rebase')
-rwxr-xr-x | bin/ak-zchain-rebase | 12 |
1 files 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 |