aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ak54
-rwxr-xr-xbin/ak-cjdns5
-rwxr-xr-xbin/ak-clean4
-rwxr-xr-xbin/ak-coin4
-rwxr-xr-xbin/ak-config4
-rwxr-xr-xbin/ak-fs6
-rwxr-xr-xbin/ak-get-balances5
-rwxr-xr-xbin/ak-gpg12
-rwxr-xr-xbin/ak-ipfs5
-rwxr-xr-xbin/ak-irc5
-rwxr-xr-xbin/ak-log5
-rwxr-xr-xbin/ak-maintainance5
-rwxr-xr-xbin/ak-mine7
-rwxr-xr-xbin/ak-network5
-rwxr-xr-xbin/ak-node-info4
-rwxr-xr-xbin/ak-ns73
-rwxr-xr-xbin/ak-pkg5
-rwxr-xr-xbin/ak-profile7
-rwxr-xr-xbin/ak-sblock5
-rwxr-xr-xbin/ak-schain5
-rwxr-xr-xbin/ak-settings5
-rwxr-xr-xbin/ak-sh4
-rwxr-xr-xbin/ak-startup5
-rwxr-xr-xbin/ak-template5
-rwxr-xr-xbin/ak-transactions2
-rwxr-xr-xbin/ak-wallet5
-rwxr-xr-xbin/ak-yggdrasil5
-rwxr-xr-xbin/ak-zblock5
-rwxr-xr-xbin/ak-zchain5
29 files changed, 204 insertions, 62 deletions
diff --git a/bin/ak b/bin/ak
index 5724ce2..0861d3b 100755
--- a/bin/ak
+++ b/bin/ak
@@ -17,7 +17,8 @@
### You should have received a copy of the GNU General Public License
### along with this program. If not, see <http://www.gnu.org/licenses/>.
###
-export AK_DEBUG="yes"
+export AK_DEBUG=0
+export AK_DEBUG_IRC="no"
##
## Arching Kaos CLI tool is the main executable script to use for exploring,
## creating and distributing local blockchain(s) called zchain(s).
@@ -28,14 +29,16 @@ export AK_DEBUG="yes"
##
## Run with no arguments to see available commands
##
-## -h, --help Prints this help message
+## -h, --help Prints this help message.
##
-## -s, --shell Starts an interactive shell
+## -s, --shell Starts an interactive shell.
##
## -m, --module [module] Run a specified module. If no module provided
## the list of available modules will be printed.
##
-## -f, --function [function] Get the list of available functions
+## -f, --function [function] Get the list of available functions.
+##
+## -v Print all log messages.
##
## [command] [args] Run a command. If none provided a list of
## commands will be printed.
@@ -49,6 +52,43 @@ source $AK_LIBDIR/_ak_lib_load
_ak_lib_load _ak_log
_ak_lib_load _ak_script
+if [ "$1" == "-vi" ]
+then
+ export AK_DEBUG_IRC="yes"
+ export AK_DEBUG="no"
+ shift
+fi
+if [ "$1" == "-vn" ]
+then
+ export AK_DEBUG="no"
+ shift
+fi
+if [ "$1" == "-vvvvv" ]
+then
+ export AK_DEBUG=5
+ shift
+fi
+if [ "$1" == "-vvvv" ]
+then
+ export AK_DEBUG=4
+ shift
+fi
+if [ "$1" == "-vvv" ]
+then
+ export AK_DEBUG=3
+ shift
+fi
+if [ "$1" == "-vv" ]
+then
+ export AK_DEBUG=2
+ shift
+fi
+if [ "$1" == "-v" ]
+then
+ export AK_DEBUG=1
+ shift
+fi
+
if [ $# -eq 0 ]
then
_ak_log_warning "No command given"
@@ -61,11 +101,11 @@ then
args="-h"
if [ -n "$subcmd" ]
then
- echo $subcmd | cut -d '-' -f 2 | sort | uniq | sed -e 's/^/ak /g'
+ echo $subcmd | cut -d '-' -f 2 | sort | uniq #| sed -e 's/^/ak /g'
#$(echo $subcmd) $args
fi
done
- ) | sort | uniq | sed 's/^/# /g' | while read line; do _ak_log_info "$line";done
+ ) | sort | uniq #| sed 's/^/# /g' | while read line; do _ak_log_info "$line";done
exit 1
fi
@@ -179,7 +219,7 @@ else
fi
counter=$(($counter + 1))
done
- _ak_usage
+ # _ak_usage err
find $AK_BINDIR | while read available
do
echo $(basename $available) |\
diff --git a/bin/ak-cjdns b/bin/ak-cjdns
index 1b2e4c0..dfd6560 100755
--- a/bin/ak-cjdns
+++ b/bin/ak-cjdns
@@ -47,7 +47,8 @@ then
--install) _ak_cjdns_install; exit;;
--connect) _ak_cjdns_connect_peers; exit;;
--ip) _ak_cjdns_get_ip; exit;;
- * ) _ak_usage;;
+ * ) _ak_usage err;;
esac
-else _ak_usage
+else
+ _ak_usage err
fi
diff --git a/bin/ak-clean b/bin/ak-clean
index b77e74b..98d9c8c 100755
--- a/bin/ak-clean
+++ b/bin/ak-clean
@@ -54,8 +54,8 @@ then
case $1 in
-h | --help) _ak_usage; exit;;
-c | --clean) _ak_tmp_cleanup; exit;;
- *) _ak_usage;
+ *) _ak_usage err;
esac
else
- _ak_usage
+ _ak_usage err
fi
diff --git a/bin/ak-coin b/bin/ak-coin
index c7478ab..4f97dd2 100755
--- a/bin/ak-coin
+++ b/bin/ak-coin
@@ -41,7 +41,7 @@ then
case $1 in
-h | --help) _ak_usage; exit;;
--stats) _ak_coin_stats; exit;;
- * ) _ak_usage;;
+ * ) _ak_usage err;;
esac
-else _ak_usage
+else _ak_usage err
fi
diff --git a/bin/ak-config b/bin/ak-config
index 770255b..ff8918f 100755
--- a/bin/ak-config
+++ b/bin/ak-config
@@ -43,8 +43,8 @@ then
--publish) _ak_config_publish;exit;;
--get-published) _ak_config_published;exit;;
--get-ipns-key) _ak_ipfs_get_config_ipns_key;exit;;
- *) _ak_usage;exit;;
+ *) _ak_usage err;exit;;
esac
else
- _ak_usage
+ _ak_usage err
fi
diff --git a/bin/ak-fs b/bin/ak-fs
index 1109539..a7a0dca 100755
--- a/bin/ak-fs
+++ b/bin/ak-fs
@@ -27,6 +27,7 @@
## --get, --export <roothash> <output file> Exports a file from the AKFS system
## --cat <roothash> Concatenates from given hash
## --list Lists names and roots available
+## --llist Lists names available and their dates
## --net-cat-from-map <maphash> Concatenates from map via the network
## --net-get-from-map <maphash> Downloads from map via the network
## --cfm <maphash> Concatenates from map
@@ -53,12 +54,13 @@ then
--net-cat-from-map) _ak_fs_net_cat_from_map_hash $2; exit;;
--net-get-from-map) _ak_fs_net_get_from_map_hash $2; exit;;
--list) _ak_fs_list; exit;;
+ --llist) _ak_fs_long_list; exit;;
--cfm) _ak_fs_cat_from_map_hash $2; exit;;
--gfm) _ak_fs_get_from_map_hash $2; exit;;
--rhd) _ak_fs_return_hash_dir $2; echo ;exit;;
--rhp) _ak_fs_return_hash_path $2; echo ; exit;;
- * ) _ak_usage;;
+ * ) _ak_usage err;;
esac
else
- _ak_usage
+ _ak_usage err
fi
diff --git a/bin/ak-get-balances b/bin/ak-get-balances
index f5f57ca..a8ee44e 100755
--- a/bin/ak-get-balances
+++ b/bin/ak-get-balances
@@ -286,9 +286,12 @@ function _ak_schain_counting_balances(){
fi
}
-if [ ! -z $1 ] && [ -n "$1" ]
+if [ ! -z $1 ] && [ -n "$1" ] && [ [ "$1" == "--help" ] || [ "$1" == "-h" ] ]
then
_ak_usage
+elif [ ! -z $1 ] && [ -n "$1" ]
+then
+ _ak_usage err
else
CUR_TARGET="$LATEST"
_ak_log_info "$CUR_TARGET $LATEST"
diff --git a/bin/ak-gpg b/bin/ak-gpg
index 3acfc0b..3bbd736 100755
--- a/bin/ak-gpg
+++ b/bin/ak-gpg
@@ -26,6 +26,8 @@
## --get-key-self-as-ipfs Returns your key as an IPFS hash
## --get-key-self-as-fingerprint Returns the fingerprint of your key
## --get-key-fingerprint-from-ipfs Returns the fingerprint of a given key
+## --export-key <fingerprint> <out> Exports a public key as <out> filename
+## --export-selected-key Selects a key to export
## --export-key-self-to-file Exports self public key as 'self.pub'
## --clear-sign <file> <output> Sign a file clearly
## --verify-file <file> Verify a clear signed file
@@ -39,6 +41,7 @@
## plain GPG output
## -lsl, --list-secret-keys-long Returns a list of secret GPG keys with
## their 1st uid
+## -i, --import-key <file> Imports a GPG key from a <file>
## -c, --create-key <email> Creates a GPG key with a label <email>
## -s, --select-key Selects the GPG key you want to use
## -d, --delete-key Delete GPG keys from your keyring
@@ -62,11 +65,12 @@ _ak_lib_load _ak_gpg
if [ ! -z $1 ]; then
case $1 in
-h | --help) _ak_usage; exit;;
- --example) example; exit;;
--get-key-self-as-ipfs) _ak_gpg_key_self_get_fingerprint_from_config; exit;;
--get-key-self-as-fingerprint) _ak_gpg_key_self_get_fingerprint; exit;;
--get-key-fingerprint-from-ipfs) shift; _ak_gpg_key_get_fingerprint_from_ipfs $1; exit;;
--export-key-self-to-file) _ak_gpg_key_self_export 'self.pub'; exit;;
+ --export-selected-key) _ak_gpg_select_key_to_export; exit;;
+ --export-key) _ak_gpg_key_export "$2" "$3"; exit;;
--clear-sign) shift; _ak_gpg_sign_clear "$2" "$1"; exit;;
--verify-file) shift; _ak_gpg_verify_clear_signature "$1"; exit;;
--list-keys | -l) _ak_gpg_list_keys; exit;;
@@ -75,12 +79,14 @@ if [ ! -z $1 ]; then
--list-secret-keys | -ls) _ak_gpg_list_secret_keys; exit;;
--list-secret-keys-long | -lsl) _ak_gpg_list_secret_keys_long; exit;;
--list-secret-keys-plain | -lsp) _ak_gpg_list_secret_keys_plain; exit;;
+ --import-key | -i) shift; _ak_gpg_key_import_from_file $1; exit;;
--create-key | -c) shift; _ak_gpg_create_key $1; exit;;
--select-key | -s) _ak_gpg_select_key; exit;;
--delete-key | -d) _ak_gpg_delete_key; exit;;
--delete-secret-key | -ds) shift; _ak_gpg_delete_secret_key $1; exit;;
--run | -r) shift; _ak_gpg $*; exit;;
- * ) _ak_usage;;
+ * ) _ak_usage err;;
esac
-else _ak_usage
+else
+ _ak_usage err
fi
diff --git a/bin/ak-ipfs b/bin/ak-ipfs
index f3ef6da..ff66895 100755
--- a/bin/ak-ipfs
+++ b/bin/ak-ipfs
@@ -42,7 +42,8 @@ then
-h | --help) _ak_usage; exit;;
-d | --daemon) _ak_ipfs_starter; exit;;
-r | --run) shift; _ak_ipfs_runner $*; exit;;
- * ) _ak_usage;;
+ * ) _ak_usage err;;
esac
-else _ak_usage
+else
+ _ak_usage err
fi
diff --git a/bin/ak-irc b/bin/ak-irc
index b2351ce..1713da6 100755
--- a/bin/ak-irc
+++ b/bin/ak-irc
@@ -46,7 +46,8 @@ then
-h | --help) _ak_usage; exit;;
--example) example; exit;;
--connect) _ak_irc_connect; exit;;
- * ) _ak_usage;;
+ * ) _ak_usage err;;
esac
-else _ak_usage
+else
+ _ak_usage err
fi
diff --git a/bin/ak-log b/bin/ak-log
index f1c1391..cf83c71 100755
--- a/bin/ak-log
+++ b/bin/ak-log
@@ -53,7 +53,8 @@ if [ ! -z $1 ]; then
-g | --grep) _ak_log_grep; exit;;
-m | --message) shift; _ak_log_message $*; exit;;
-r | --rotate) _ak_log_rotate; exit;;
- * ) _ak_usage;;
+ * ) _ak_usage err;;
esac
-else _ak_usage
+else
+ _ak_usage err
fi
diff --git a/bin/ak-maintainance b/bin/ak-maintainance
index e0cd82d..ea85211 100755
--- a/bin/ak-maintainance
+++ b/bin/ak-maintainance
@@ -46,8 +46,9 @@ then
-r | --restore) _ak_maintainance_restore $2; exit;;
-b | --backup) _ak_maintainance_backup; exit;;
-n | --nuke) _ak_maintainance_nuke_all_but_core; exit;;
- * ) _ak_usage;;
+ * ) _ak_usage err;;
esac
-else _ak_usage
+else
+ _ak_usage err
fi
diff --git a/bin/ak-mine b/bin/ak-mine
index 42202d3..53f7549 100755
--- a/bin/ak-mine
+++ b/bin/ak-mine
@@ -32,7 +32,7 @@ descriptionString="Sblock mining"
source $AK_LIBDIR/_ak_lib_load
_ak_lib_load _ak_log
_ak_lib_load _ak_script
-_ak_lib_load _ak_utils
+_ak_lib_load _ak_datetime
gather_zblocks(){
if [ "$(cat $AK_ZBLOCKSFILE | jq -r '.[].zblock' | wc -l)" -ne 0 ]
@@ -90,7 +90,8 @@ then
-h | --help) _ak_usage; exit;;
--example) example; exit;;
--mine) proofofwork; exit;;
- * ) _ak_usage;;
+ * ) _ak_usage err;;
esac
-else _ak_usage
+else
+ _ak_usage err
fi
diff --git a/bin/ak-network b/bin/ak-network
index 40efd72..529d2ea 100755
--- a/bin/ak-network
+++ b/bin/ak-network
@@ -49,7 +49,8 @@ if [ ! -z $1 ]; then
-s | --scan) shift; _ak_network_scan $*; exit;;
-c | --connect) _ak_network_connect $2; exit;;
-p | --peers) _ak_network_show_peers $2; exit;;
- * ) _ak_usage;;
+ * ) _ak_usage err;;
esac
-else _ak_usage
+else
+ _ak_usage err
fi
diff --git a/bin/ak-node-info b/bin/ak-node-info
index 29eea87..b0a9663 100755
--- a/bin/ak-node-info
+++ b/bin/ak-node-info
@@ -47,9 +47,9 @@ then
_ak_node_info_ipns_key
;;
*)
- _ak_usage
+ _ak_usage err
;;
esac
else
- _ak_usage
+ _ak_usage err
fi
diff --git a/bin/ak-ns b/bin/ak-ns
new file mode 100755
index 0000000..94bdcd9
--- /dev/null
+++ b/bin/ak-ns
@@ -0,0 +1,73 @@
+#!/usr/bin/env bash
+###
+### arching-kaos-tools
+### Tools to interact and build an Arching Kaos Infochain
+### Copyright (C) 2021 - 2025 kaotisk
+###
+### This program is free software: you can redistribute it and/or modify
+### it under the terms of the GNU General Public License as published by
+### the Free Software Foundation, either version 3 of the License, or
+### (at your option) any later version.
+###
+### This program is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+### GNU General Public License for more details.
+###
+### You should have received a copy of the GNU General Public License
+### along with this program. If not, see <http://www.gnu.org/licenses/>.
+###
+##
+## AKNS is a name system for Arching Kaos
+##
+## Usage:
+##
+## -h, --help Prints this help message
+## -c, --create <name> Creates a new key-pair with name
+## -l, --list List names
+## -ll, --list-long List names with keys
+## -rn, --resolve-name <name> Resolves value from name
+## -rk, --resolve-key <key> Resolves value from key
+## -rp, --resolve-key-proof <key> Resolves value from key and provides
+## an akfs_map_v3 to clear signed proof
+## -rj, --resolve-key-json <key> Resolves a key to a JSON format
+## -ra, --resolve-all Resolve all reachable keys
+## -p, --publish <key> <value> Publishes value to key
+## -pn, --publish2name <name> <value> Publishes value to name
+## -pz, --publish-zchain Publishes zchain
+## -pc, --publish-config Publishes config
+## -ek, --encode-key <key> Encodes a key to Base64
+## -dk, --decode-key <base64 key> Decodes a key from Base64
+##
+fullprogrampath="$(realpath $0)"
+PROGRAM=$(basename $0)
+descriptionString="Name system"
+
+source $AK_LIBDIR/_ak_lib_load
+_ak_lib_load _ak_log
+_ak_lib_load _ak_script
+_ak_lib_load _ak_ns
+
+if [ ! -z $1 ]
+then
+ case $1 in
+ -h | --help) _ak_usage; exit;;
+ -c | --create) shift; _ak_ns_create $1; exit;;
+ -l | --list) shift; _ak_ns_list; exit;;
+ -ll | --list-long) shift; _ak_ns_list_long; exit;;
+ -rn | --resolve-name) shift; _ak_ns_resolve_from_name $1; exit;;
+ -rk | --resolve-key) shift; _ak_ns_resolve_from_key $1; exit;;
+ -rp | --resolve-key-proof) shift; _ak_ns_resolve_from_key_with_proof $1; exit;;
+ -rj | --resolve-key-json) shift; _ak_ns_resolve_from_key_with_proof_json $1; exit;;
+ -ra | --resolve-all) _ak_ns_resolve_all_keys; exit;;
+ -ek | --encode-key) shift; _ak_ns_encode_key $1; exit;;
+ -dk | --decode-key) shift; _ak_ns_decode_key $1; exit;;
+ -p | --publish) shift; _ak_ns_publish $1 $2; exit;;
+ -pn | --publish2name) shift; _ak_ns_publish2name $1 $2; exit;;
+ -pz | --publish-zchain) _ak_ns_publish_zchain; exit;;
+ -pc | --publish-config) _ak_ns_publish_config; exit;;
+ * ) _ak_usage err;;
+ esac
+else
+ _ak_usage err
+fi
diff --git a/bin/ak-pkg b/bin/ak-pkg
index d01921a..940c084 100755
--- a/bin/ak-pkg
+++ b/bin/ak-pkg
@@ -53,7 +53,8 @@ then
--install-from-zblock) shift; _ak_pkg_install_from_zblock $1; exit;;
--install-from-akfs) shift; _ak_pkg_install_from_akfsmap $1; exit;;
--uninstall) _ak_pkg_uninstall; exit;;
- * ) _ak_usage;;
+ * ) _ak_usage err;;
esac
-else _ak_usage
+else
+ _ak_usage err
fi
diff --git a/bin/ak-profile b/bin/ak-profile
index 891dbac..eaf8e0b 100755
--- a/bin/ak-profile
+++ b/bin/ak-profile
@@ -46,7 +46,7 @@ ZPROFILEDIR="$AK_WORKDIR/profile"
source $AK_LIBDIR/_ak_lib_load
_ak_lib_load _ak_log
_ak_lib_load _ak_script
-_ak_lib_load _ak_utils
+_ak_lib_load _ak_datetime
_ak_lib_load _ak_ipfs
_ak_lib_load _ak_gpg
_ak_lib_load _ak_zblock
@@ -235,7 +235,8 @@ if [ ! -z $1 ]; then
-a | --add) _ak_modules_profile_add $2; exit;;
-s | --set) _ak_modules_profile_propset $2 "$3"; exit;;
-g | --get) _ak_modules_profile_propget $2; exit;;
- * ) _ak_usage;;
+ * ) _ak_usage err;;
esac
-else _ak_usage
+else
+ _ak_usage err
fi
diff --git a/bin/ak-sblock b/bin/ak-sblock
index 7c6ab23..ec7464e 100755
--- a/bin/ak-sblock
+++ b/bin/ak-sblock
@@ -41,7 +41,8 @@ then
case $1 in
-h | --help) _ak_usage; exit;;
-s | --show) shift; _ak_sblock_show $1; exit;;
- * ) _ak_usage;;
+ * ) _ak_usage err;;
esac
-else _ak_usage
+else
+ _ak_usage err
fi
diff --git a/bin/ak-schain b/bin/ak-schain
index 6efcd56..90b2cb0 100755
--- a/bin/ak-schain
+++ b/bin/ak-schain
@@ -44,7 +44,8 @@ then
-h | --help) _ak_usage; exit;;
-c | --crawl) shift; _ak_schain_crawl_interface $*; exit;;
-l | --get-latest) _ak_schain_get_latest; exit;;
- * ) _ak_usage;;
+ * ) _ak_usage err;;
esac
-else _ak_usage
+else
+ _ak_usage err
fi
diff --git a/bin/ak-settings b/bin/ak-settings
index cf6b77d..32028fd 100755
--- a/bin/ak-settings
+++ b/bin/ak-settings
@@ -61,7 +61,8 @@ if [ ! -z $1 ]; then
-h | --help) _ak_usage; exit;;
-g | --get) _ak_settings_get "$2" ; exit;;
-s | --set) _ak_settings_set "$2" "$3" ; exit;;
- * ) _ak_usage;;
+ * ) _ak_usage err;;
esac
-else _ak_usage
+else
+ _ak_usage err
fi
diff --git a/bin/ak-sh b/bin/ak-sh
index e0b39dd..acdd0f5 100755
--- a/bin/ak-sh
+++ b/bin/ak-sh
@@ -39,8 +39,8 @@ then
case $1 in
-h | --help) _ak_usage; exit;;
-s | --shell) _ak_shell; exit;;
- * ) _ak_usage;;
+ * ) _ak_usage err;;
esac
else
- _ak_usage
+ _ak_usage err
fi
diff --git a/bin/ak-startup b/bin/ak-startup
index ce54b79..c73cdd0 100755
--- a/bin/ak-startup
+++ b/bin/ak-startup
@@ -55,7 +55,8 @@ then
case $1 in
-h | --help) _ak_usage; exit;;
--start) shift; _ak_start_up_sequence $1; exit;;
- * ) _ak_usage;;
+ * ) _ak_usage err;;
esac
-else _ak_usage
+else
+ _ak_usage err
fi
diff --git a/bin/ak-template b/bin/ak-template
index b5333be..5a7653c 100755
--- a/bin/ak-template
+++ b/bin/ak-template
@@ -44,7 +44,8 @@ then
case $1 in
-h | --help) _ak_usage; exit;;
--example) example; exit;;
- * ) _ak_usage;;
+ * ) _ak_usage err;;
esac
-else _ak_usage
+else
+ _ak_usage err
fi
diff --git a/bin/ak-transactions b/bin/ak-transactions
index fe00411..8af4530 100755
--- a/bin/ak-transactions
+++ b/bin/ak-transactions
@@ -27,7 +27,7 @@ descriptionString="Transactions module"
source $AK_LIBDIR/_ak_lib_load
_ak_lib_load _ak_log
_ak_lib_load _ak_script
-_ak_lib_load _ak_utils
+_ak_lib_load _ak_datetime
_ak_lib_load _ak_ipfs
_ak_lib_load _ak_gpg
_ak_lib_load _ak_zblock
diff --git a/bin/ak-wallet b/bin/ak-wallet
index 9ed9be9..708d6d7 100755
--- a/bin/ak-wallet
+++ b/bin/ak-wallet
@@ -42,7 +42,8 @@ then
case $1 in
-h | --help) _ak_usage; exit;;
--generic) _ak_wallet_generic; exit;;
- * ) _ak_usage;;
+ * ) _ak_usage err;;
esac
-else _ak_usage
+else
+ _ak_usage err
fi
diff --git a/bin/ak-yggdrasil b/bin/ak-yggdrasil
index a133f78..3bff15c 100755
--- a/bin/ak-yggdrasil
+++ b/bin/ak-yggdrasil
@@ -49,7 +49,8 @@ then
--install) _ak_yggdrasil_install; exit;;
--connect) _ak_yggdrasil_connect_peers; exit;;
--ip) _ak_yggdrasil_get_ip; exit;;
- * ) _ak_usage;;
+ * ) _ak_usage err;;
esac
-else _ak_usage
+else
+ _ak_usage err
fi
diff --git a/bin/ak-zblock b/bin/ak-zblock
index 7fe5005..36df89e 100755
--- a/bin/ak-zblock
+++ b/bin/ak-zblock
@@ -71,7 +71,8 @@ if [ ! -z $1 ]; then
_ak_zblock_announce $2
exit
;;
- * ) _ak_usage;;
+ * ) _ak_usage err;;
esac
-else _ak_usage
+else
+ _ak_usage err
fi
diff --git a/bin/ak-zchain b/bin/ak-zchain
index 2cc8df9..ecdb175 100755
--- a/bin/ak-zchain
+++ b/bin/ak-zchain
@@ -79,7 +79,8 @@ if [ ! -z $1 ]; then
--crawl-remote-ipns) _ak_zchain_crawl_remote_ipns $2; exit;;
--get-latest) _ak_zchain_get_latest; exit;;
--output-types)shift; _ak_zchain_output_types $1; exit;;
- * ) _ak_usage;;
+ * ) _ak_usage err;;
esac
-else _ak_usage
+else
+ _ak_usage err
fi