diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ak | 15 | ||||
-rwxr-xr-x | bin/ak-cjdns | 12 | ||||
-rwxr-xr-x | bin/ak-clean | 7 | ||||
-rwxr-xr-x | bin/ak-coin | 11 | ||||
-rwxr-xr-x | bin/ak-config | 11 | ||||
-rwxr-xr-x | bin/ak-fs | 11 | ||||
-rwxr-xr-x | bin/ak-get-balances | 22 | ||||
-rwxr-xr-x | bin/ak-gpg | 16 | ||||
-rwxr-xr-x | bin/ak-ipfs | 12 | ||||
-rwxr-xr-x | bin/ak-ipfs-starter | 5 | ||||
-rwxr-xr-x | bin/ak-irc | 12 | ||||
-rwxr-xr-x | bin/ak-log | 11 | ||||
-rwxr-xr-x | bin/ak-maintainance | 12 | ||||
-rwxr-xr-x | bin/ak-mempool | 5 | ||||
-rwxr-xr-x | bin/ak-mine | 12 | ||||
-rwxr-xr-x | bin/ak-network | 12 | ||||
-rwxr-xr-x | bin/ak-node-info | 11 | ||||
-rwxr-xr-x | bin/ak-ns | 73 | ||||
-rwxr-xr-x | bin/ak-pkg | 14 | ||||
-rwxr-xr-x | bin/ak-profile | 18 | ||||
-rwxr-xr-x | bin/ak-sblock | 12 | ||||
-rwxr-xr-x | bin/ak-schain | 12 | ||||
-rwxr-xr-x | bin/ak-settings | 12 | ||||
-rwxr-xr-x | bin/ak-sh | 11 | ||||
-rwxr-xr-x | bin/ak-startup | 12 | ||||
-rwxr-xr-x | bin/ak-template | 10 | ||||
-rwxr-xr-x | bin/ak-transactions | 13 | ||||
-rwxr-xr-x | bin/ak-wallet | 14 | ||||
-rwxr-xr-x | bin/ak-yggdrasil | 12 | ||||
-rwxr-xr-x | bin/ak-zblock | 12 | ||||
-rwxr-xr-x | bin/ak-zchain | 14 |
31 files changed, 288 insertions, 148 deletions
@@ -18,6 +18,7 @@ ### along with this program. If not, see <http://www.gnu.org/licenses/>. ### export AK_DEBUG="yes" +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). @@ -45,8 +46,16 @@ PROGRAM="$(basename $0)" descriptionString="Arching Kaos CLI" source $HOME/.arching-kaos/rc -source $AK_LIBDIR/_ak_log -source $AK_LIBDIR/_ak_script +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 [ $# -eq 0 ] then @@ -153,7 +162,7 @@ case "$1" in _ak_exit_program $? "$subcmd module finished"; ;; -s|--shell) - ak sh -s + rlwrap ak sh -s _ak_exit_program $? "Shell terminated"; ;; esac diff --git a/bin/ak-cjdns b/bin/ak-cjdns index d61a477..dfd6560 100755 --- a/bin/ak-cjdns +++ b/bin/ak-cjdns @@ -33,9 +33,10 @@ PROGRAM=$(basename $0) descriptionString="cjdns helper" # At least these -source $AK_LIBDIR/_ak_log -source $AK_LIBDIR/_ak_script -source $AK_LIBDIR/_ak_cjdns +source $AK_LIBDIR/_ak_lib_load +_ak_lib_load _ak_log +_ak_lib_load _ak_script +_ak_lib_load _ak_cjdns # Flags to run if [ ! -z $1 ] @@ -46,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 675d34a..98d9c8c 100755 --- a/bin/ak-clean +++ b/bin/ak-clean @@ -35,7 +35,8 @@ fullprogrampath="$(realpath $0)" PROGRAM="$(basename $0)" descriptionString="Cleans ak temp files" -source $AK_LIBDIR/_ak_script +source $AK_LIBDIR/_ak_lib_load +_ak_lib_load _ak_script function _ak_tmp_cleanup(){ ls -1 /tmp/aktmp* > /dev/null 2>&1 @@ -53,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 0bd7f15..4f97dd2 100755 --- a/bin/ak-coin +++ b/bin/ak-coin @@ -30,9 +30,10 @@ PROGRAM=$(basename $0) descriptionString="Coin status" # At least these -source $AK_LIBDIR/_ak_log -source $AK_LIBDIR/_ak_script -source $AK_LIBDIR/_ak_coin +source $AK_LIBDIR/_ak_lib_load +_ak_lib_load _ak_log +_ak_lib_load _ak_script +_ak_lib_load _ak_coin # Flags to run if [ ! -z $1 ] @@ -40,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 4337a2d..ff8918f 100755 --- a/bin/ak-config +++ b/bin/ak-config @@ -30,9 +30,10 @@ fullprogrampath="$(realpath $0)" PROGRAM="$(basename $0)" descriptionString="Arching Kaos Configuration Tool" -source $AK_LIBDIR/_ak_script -source $AK_LIBDIR/_ak_config -source $AK_LIBDIR/_ak_ipfs +source $AK_LIBDIR/_ak_lib_load +_ak_lib_load _ak_script +_ak_lib_load _ak_config +_ak_lib_load _ak_ipfs if [ ! -z $1 ] && [ -n "$1" ] then @@ -42,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 @@ -36,9 +36,10 @@ fullprogrampath="$(realpath $0)" PROGRAM=$(basename $0) descriptionString="AKFS tools" -source $AK_LIBDIR/_ak_log -source $AK_LIBDIR/_ak_script -source $AK_LIBDIR/_ak_fs +source $AK_LIBDIR/_ak_lib_load +_ak_lib_load _ak_log +_ak_lib_load _ak_script +_ak_lib_load _ak_fs if [ ! -z $1 ] then @@ -56,8 +57,8 @@ then --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 c25d2d1..a8ee44e 100755 --- a/bin/ak-get-balances +++ b/bin/ak-get-balances @@ -28,14 +28,15 @@ fullprogrampath="$(realpath $0)" PROGRAM="$(basename $0)" descriptionString="Export balances from schain and zchains" -source $AK_LIBDIR/_ak_log -source $AK_LIBDIR/_ak_script -source $AK_LIBDIR/_ak_ipfs -source $AK_LIBDIR/_ak_gpg -source $AK_LIBDIR/_ak_zchain -source $AK_LIBDIR/_ak_schain -source $AK_LIBDIR/_ak_sblock -source $AK_LIBDIR/_ak_coin +source $AK_LIBDIR/_ak_lib_load +_ak_lib_load _ak_log +_ak_lib_load _ak_script +_ak_lib_load _ak_ipfs +_ak_lib_load _ak_gpg +_ak_lib_load _ak_zchain +_ak_lib_load _ak_schain +_ak_lib_load _ak_sblock +_ak_lib_load _ak_coin #set -xe AK_DB="$AK_WORKDIR/db" @@ -285,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" @@ -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 @@ -51,9 +53,10 @@ PROGRAM=$(basename $0) descriptionString="GPG cli tool" # At least these -source $AK_LIBDIR/_ak_log -source $AK_LIBDIR/_ak_script -source $AK_LIBDIR/_ak_gpg +source $AK_LIBDIR/_ak_lib_load +_ak_lib_load _ak_log +_ak_lib_load _ak_script +_ak_lib_load _ak_gpg @@ -66,6 +69,8 @@ if [ ! -z $1 ]; then --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;; @@ -79,7 +84,8 @@ if [ ! -z $1 ]; then --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 376c3c0..ff66895 100755 --- a/bin/ak-ipfs +++ b/bin/ak-ipfs @@ -30,9 +30,10 @@ fullprogrampath="$(realpath $0)" PROGRAM=$(basename $0) descriptionString="IPFS handler" -source $AK_LIBDIR/_ak_log -source $AK_LIBDIR/_ak_script -source $AK_LIBDIR/_ak_ipfs +source $AK_LIBDIR/_ak_lib_load +_ak_lib_load _ak_log +_ak_lib_load _ak_script +_ak_lib_load _ak_ipfs # Flags to run if [ ! -z $1 ] @@ -41,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-ipfs-starter b/bin/ak-ipfs-starter index 8076427..df2791c 100755 --- a/bin/ak-ipfs-starter +++ b/bin/ak-ipfs-starter @@ -19,8 +19,9 @@ ### PROGRAM="$(basename $0)" -source $AK_LIBDIR/_ak_log -source $AK_LIBDIR/_ak_ipfs +source $AK_LIBDIR/_ak_lib_load +_ak_lib_load _ak_log +_ak_lib_load _ak_ipfs screen -dmS akipfsd _ak_ipfs_daemon if [ $? -ne 0 ] @@ -29,9 +29,10 @@ PROGRAM=$(basename $0) descriptionString="IRC" # At least these -source $AK_LIBDIR/_ak_log -source $AK_LIBDIR/_ak_script -source $AK_LIBDIR/_ak_irc +source $AK_LIBDIR/_ak_lib_load +_ak_lib_load _ak_log +_ak_lib_load _ak_script +_ak_lib_load _ak_irc # Your stuff here... example(){ @@ -45,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 @@ -35,8 +35,9 @@ PROGRAM=$(basename $0) descriptionString="Log file handler" # At least these -source $AK_LIBDIR/_ak_log -source $AK_LIBDIR/_ak_script +source $AK_LIBDIR/_ak_lib_load +_ak_lib_load _ak_log +_ak_lib_load _ak_script # Your stuff here... example(){ @@ -48,10 +49,12 @@ if [ ! -z $1 ]; then case $1 in -h | --help) _ak_usage; exit;; -f | --follow) _ak_log_follow; exit;; + -l | --last) _ak_log_last_line; exit;; -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 8490007..ea85211 100755 --- a/bin/ak-maintainance +++ b/bin/ak-maintainance @@ -33,9 +33,10 @@ PROGRAM=$(basename $0) descriptionString="AK Backup" # At least these -source $AK_LIBDIR/_ak_log -source $AK_LIBDIR/_ak_script -source $AK_LIBDIR/_ak_maintainance +source $AK_LIBDIR/_ak_lib_load +_ak_lib_load _ak_log +_ak_lib_load _ak_script +_ak_lib_load _ak_maintainance # Flags to run if [ ! -z $1 ] @@ -45,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-mempool b/bin/ak-mempool index a994340..3bd9ca5 100755 --- a/bin/ak-mempool +++ b/bin/ak-mempool @@ -29,8 +29,9 @@ PROGRAM=$(basename $0) descriptionString="Quick description" # At least these -source $AK_LIBDIR/_ak_log -source $AK_LIBDIR/_ak_script +source $AK_LIBDIR/_ak_lib_load +_ak_lib_load _ak_log +_ak_lib_load _ak_script # Assumptions: # I suppose each ak node is connected to some IP. # They also run IPFS. diff --git a/bin/ak-mine b/bin/ak-mine index 00c7458..53f7549 100755 --- a/bin/ak-mine +++ b/bin/ak-mine @@ -29,9 +29,10 @@ fullprogrampath="$(realpath $0)" PROGRAM=$(basename $0) descriptionString="Sblock mining" -source $AK_LIBDIR/_ak_log -source $AK_LIBDIR/_ak_script -source $AK_LIBDIR/_ak_utils +source $AK_LIBDIR/_ak_lib_load +_ak_lib_load _ak_log +_ak_lib_load _ak_script +_ak_lib_load _ak_datetime gather_zblocks(){ if [ "$(cat $AK_ZBLOCKSFILE | jq -r '.[].zblock' | wc -l)" -ne 0 ] @@ -89,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 9873d12..529d2ea 100755 --- a/bin/ak-network +++ b/bin/ak-network @@ -37,9 +37,10 @@ PROGRAM=$(basename $0) descriptionString="AK Nettool" # At least these -source $AK_LIBDIR/_ak_log -source $AK_LIBDIR/_ak_script -source $AK_LIBDIR/_ak_network +source $AK_LIBDIR/_ak_lib_load +_ak_lib_load _ak_log +_ak_lib_load _ak_script +_ak_lib_load _ak_network # Flags to run if [ ! -z $1 ]; then @@ -48,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 2b9c458..b0a9663 100755 --- a/bin/ak-node-info +++ b/bin/ak-node-info @@ -29,9 +29,10 @@ fullprogrampath="$(realpath $0)" PROGRAM=$(basename $0) descriptionString="Quick description" -source $AK_LIBDIR/_ak_log -source $AK_LIBDIR/_ak_script -source $AK_LIBDIR/_ak_node +source $AK_LIBDIR/_ak_lib_load +_ak_lib_load _ak_log +_ak_lib_load _ak_script +_ak_lib_load _ak_node if [ ! -z "$1" ] then @@ -46,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 @@ -26,6 +26,7 @@ ## -h, --help Prints this help message ## --make-releases-from-local Makes releases from all local installation's module ## --make-release-from-local Makes release from a local installation's module +## --make-release-from-directory Makes release from a local directory ## --install-from-zblock <zblock> Installs from a zblock ## --install-from-akfs <maphash> Installs from an AKFS map ## --uninstall Uninstalls a module selected from a menu @@ -35,9 +36,10 @@ PROGRAM=$(basename $0) descriptionString="Package Manager" # At least these -source $AK_LIBDIR/_ak_log -source $AK_LIBDIR/_ak_pkg -source $AK_LIBDIR/_ak_script +source $AK_LIBDIR/_ak_lib_load +_ak_lib_load _ak_log +_ak_lib_load _ak_script +_ak_lib_load _ak_pkg # Flags to run @@ -47,10 +49,12 @@ then -h | --help) _ak_usage; exit;; --make-releases-from-local) shift; _ak_pkg_all_modules_make_releases_from_local_installation; exit;; --make-release-from-local) _ak_pkg_all_modules_make_release_from_local_installation $1; exit;; + --make-release-from-directory) shift; _ak_pkg_all_modules_make_release_from_local_directory $1; exit;; --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 4232b55..eaf8e0b 100755 --- a/bin/ak-profile +++ b/bin/ak-profile @@ -43,12 +43,13 @@ PROGRAM=$(basename $0) descriptionString="Profile module" ZPROFILEDIR="$AK_WORKDIR/profile" -source $AK_LIBDIR/_ak_log -source $AK_LIBDIR/_ak_script -source $AK_LIBDIR/_ak_utils -source $AK_LIBDIR/_ak_ipfs -source $AK_LIBDIR/_ak_gpg -source $AK_LIBDIR/_ak_zblock +source $AK_LIBDIR/_ak_lib_load +_ak_lib_load _ak_log +_ak_lib_load _ak_script +_ak_lib_load _ak_datetime +_ak_lib_load _ak_ipfs +_ak_lib_load _ak_gpg +_ak_lib_load _ak_zblock # Whatever the command is, we check if $ZPROFILEDIR is there. # If NOT we create it and we change dir there. @@ -234,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 742b6a9..ec7464e 100755 --- a/bin/ak-sblock +++ b/bin/ak-sblock @@ -30,9 +30,10 @@ PROGRAM=$(basename $0) descriptionString="Sblock tools" # At least these -source $AK_LIBDIR/_ak_log -source $AK_LIBDIR/_ak_script -source $AK_LIBDIR/_ak_sblock +source $AK_LIBDIR/_ak_lib_load +_ak_lib_load _ak_log +_ak_lib_load _ak_script +_ak_lib_load _ak_sblock # Flags to run if [ ! -z $1 ] @@ -40,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 2b5e80a..90b2cb0 100755 --- a/bin/ak-schain +++ b/bin/ak-schain @@ -32,9 +32,10 @@ fullprogrampath="$(realpath $0)" PROGRAM=$(basename $0) descriptionString="Schain tools" -source $AK_LIBDIR/_ak_log -source $AK_LIBDIR/_ak_script -source $AK_LIBDIR/_ak_schain +source $AK_LIBDIR/_ak_lib_load +_ak_lib_load _ak_log +_ak_lib_load _ak_script +_ak_lib_load _ak_schain # Flags to run if [ ! -z $1 ] @@ -43,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 9465735..32028fd 100755 --- a/bin/ak-settings +++ b/bin/ak-settings @@ -31,9 +31,10 @@ fullprogrampath="$(realpath $0)" PROGRAM=$(basename $0) descriptionString="Settings helper program" -source $AK_LIBDIR/_ak_log -source $AK_LIBDIR/_ak_script -source $AK_LIBDIR/_ak_settings +source $AK_LIBDIR/_ak_lib_load +_ak_lib_load _ak_log +_ak_lib_load _ak_script +_ak_lib_load _ak_settings if [ ! -z "$AK_SETTINGS" ] && [ -n "$AK_SETTINGS" ] then @@ -60,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 @@ -29,17 +29,18 @@ fullprogrampath="$(realpath $0)" PROGRAM=$(basename $0) descriptionString="Arching Kaos Shell" -source $AK_LIBDIR/_ak_log -source $AK_LIBDIR/_ak_script -source $AK_LIBDIR/_ak_sh +source $AK_LIBDIR/_ak_lib_load +_ak_lib_load _ak_log +_ak_lib_load _ak_script +_ak_lib_load _ak_sh if [ ! -z $1 ] 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 ed768e7..c73cdd0 100755 --- a/bin/ak-startup +++ b/bin/ak-startup @@ -34,9 +34,10 @@ descriptionString="AK system starter" source $HOME/.arching-kaos/rc PATH=$PATH:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:$HOME/bin:$AK_WORKDIR/bin -source $AK_LIBDIR/_ak_log -source $AK_LIBDIR/_ak_script -source $AK_LIBDIR/_ak_ipfs +source $AK_LIBDIR/_ak_lib_load +_ak_lib_load _ak_log +_ak_lib_load _ak_script +_ak_lib_load _ak_ipfs function _ak_start_up_sequence(){ _ak_ipfs_starter @@ -54,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 601a467..5a7653c 100755 --- a/bin/ak-template +++ b/bin/ak-template @@ -29,8 +29,9 @@ PROGRAM=$(basename $0) descriptionString="Quick description" # At least these -source $AK_LIBDIR/_ak_log -source $AK_LIBDIR/_ak_script +source $AK_LIBDIR/_ak_lib_load +_ak_lib_load _ak_log +_ak_lib_load _ak_script # Your stuff here... example(){ @@ -43,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 7881733..8af4530 100755 --- a/bin/ak-transactions +++ b/bin/ak-transactions @@ -24,12 +24,13 @@ fullprogrampath="$(realpath $0)" PROGRAM=$(basename $0) descriptionString="Transactions module" -source $AK_LIBDIR/_ak_log -source $AK_LIBDIR/_ak_utils -source $AK_LIBDIR/_ak_script -source $AK_LIBDIR/_ak_ipfs -source $AK_LIBDIR/_ak_gpg -source $AK_LIBDIR/_ak_zblock +source $AK_LIBDIR/_ak_lib_load +_ak_lib_load _ak_log +_ak_lib_load _ak_script +_ak_lib_load _ak_datetime +_ak_lib_load _ak_ipfs +_ak_lib_load _ak_gpg +_ak_lib_load _ak_zblock function _ak_modules_transactions_main(){ _ak_log_info "$FROM_ADDRESS to $TO_ADDRESS value sent: $AMOUNT" diff --git a/bin/ak-wallet b/bin/ak-wallet index 39b38f6..708d6d7 100755 --- a/bin/ak-wallet +++ b/bin/ak-wallet @@ -29,10 +29,11 @@ PROGRAM=$(basename $0) descriptionString="Wallet manager" |