diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ak | 59 | ||||
-rwxr-xr-x | bin/ak-cjdns | 27 | ||||
-rwxr-xr-x | bin/ak-clean | 25 | ||||
-rwxr-xr-x | bin/ak-coin | 27 | ||||
-rwxr-xr-x | bin/ak-config | 27 | ||||
-rwxr-xr-x | bin/ak-fs | 45 | ||||
-rwxr-xr-x | bin/ak-get-balances | 53 | ||||
-rwxr-xr-x | bin/ak-gpg | 31 | ||||
-rwxr-xr-x | bin/ak-ipfs | 48 | ||||
-rwxr-xr-x | bin/ak-ipfs-daemon | 27 | ||||
-rwxr-xr-x | bin/ak-ipfs-starter | 25 | ||||
-rwxr-xr-x | bin/ak-irc | 52 | ||||
-rwxr-xr-x | bin/ak-json2bash | 20 | ||||
-rwxr-xr-x | bin/ak-log | 26 | ||||
-rwxr-xr-x | bin/ak-maintainance | 53 | ||||
-rwxr-xr-x | bin/ak-mempool | 32 | ||||
-rwxr-xr-x | bin/ak-mine | 28 | ||||
-rwxr-xr-x | bin/ak-network | 35 | ||||
-rwxr-xr-x | bin/ak-node-info | 27 | ||||
-rwxr-xr-x | bin/ak-ns | 61 | ||||
-rwxr-xr-x | bin/ak-pkg | 59 | ||||
-rwxr-xr-x | bin/ak-profile | 48 | ||||
-rwxr-xr-x | bin/ak-sblock | 27 | ||||
-rwxr-xr-x | bin/ak-schain | 27 | ||||
-rwxr-xr-x | bin/ak-settings | 27 | ||||
-rwxr-xr-x | bin/ak-sh | 46 | ||||
-rwxr-xr-x | bin/ak-startup | 31 | ||||
-rwxr-xr-x | bin/ak-template | 25 | ||||
-rwxr-xr-x | bin/ak-transactions | 60 | ||||
-rwxr-xr-x | bin/ak-update | 20 | ||||
-rwxr-xr-x | bin/ak-wallet | 48 | ||||
-rwxr-xr-x | bin/ak-yggdrasil | 55 | ||||
-rwxr-xr-x | bin/ak-zblock | 27 | ||||
-rwxr-xr-x | bin/ak-zchain | 30 |
34 files changed, 1095 insertions, 163 deletions
@@ -1,4 +1,22 @@ -#!/bin/bash +#!/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/>. +### export AK_DEBUG="yes" ## ## Arching Kaos CLI tool is the main executable script to use for exploring, @@ -12,9 +30,13 @@ export AK_DEBUG="yes" ## ## -h, --help Prints this help message ## +## -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 +## ## [command] [args] Run a command. If none provided a list of ## commands will be printed. ## @@ -23,12 +45,14 @@ 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 [ $# -eq 0 ] then _ak_log_warning "No command given" + _ak_log_info "Available commands:" ( find $AK_BINDIR | grep 'ak-' | while read available do @@ -41,7 +65,7 @@ then #$(echo $subcmd) $args fi done - ) | sort | uniq + ) | sort | uniq | sed 's/^/# /g' | while read line; do _ak_log_info "$line";done exit 1 fi @@ -52,6 +76,10 @@ then _ak_usage exit 1 ;; + -v|--version) + _ak_version + exit 1 + ;; esac fi @@ -68,7 +96,7 @@ case "$1" in shift if [ ! -z $1 ] && [ -n "$1" ] then - grep -rnF "$1(){" $AK_BINDIR/* $AK_LIBDIR/* $AK_MODULESDIR/* + grep -rnF "$1(){" $AK_BINDIR/* $AK_LIBDIR/* $AK_MODULESDIR/* > /dev/null 2>&1 if [ $? -ne 0 ] then _ak_log_error "No function $1 found" @@ -81,13 +109,20 @@ case "$1" in fi filename="$(grep -rnF "$1(){" $AK_LIBDIR/* $AK_MODULESDIR/* | cut -d ':' -f 1)" line="$(grep -rnF "$1(){" $AK_LIBDIR/* $AK_MODULESDIR/* | cut -d ':' -f 2)" - functionname="$(grep -rnF "$1(){" $AK_LIBDIR/* $AK_MODULESDIR/* | cut -d ':' -f 3)" - printf 'Use with:\n' >&2 + functionname="$(grep -rnF "$1(){" $AK_LIBDIR/* $AK_MODULESDIR/* | cut -d ':' -f 3|sed -e 's/function //g')" + _ak_log_info "Use with:" printf 'source %s\n%s\n' "$filename" "$(echo -n $functionname | sed 's/(){//')" exit else + _ak_log_error "No function selected" + _ak_log_info "Available functions:" grep -rnF "(){" $AK_LIBDIR/* $AK_MODULESDIR/* | \ - sed -e "s#$AK_WORKDIR/##g" | sed -e 's/(){//g' | cut -d ':' -f 1,3 | tr ':' $'\t' + sed -e "s#$AK_WORKDIR/##g" | \ + sed -e 's/function //g;s/(){//g' | \ + cut -d ':' -f 1,3 | \ + tr ':' ' ' | \ + awk '{print $1 " " $2}' | \ + sort | while read line; do _ak_log_info "${line}"; done exit fi ;; @@ -100,7 +135,8 @@ case "$1" in if [ ! -n "$1" ] then _ak_log_error "No module selected" - ls -1 $AK_MODULESDIR + _ak_log_info "Modules available:" + ls -1 $AK_MODULESDIR | sed 's/^/# /g' | while read line; do _ak_log_info "$line";done exit 1 fi shift @@ -117,6 +153,10 @@ case "$1" in $subcmd/main.sh $subargs _ak_exit_program $? "$subcmd module finished"; ;; + -s|--shell) + rlwrap ak sh -s + _ak_exit_program $? "Shell terminated"; + ;; esac if [ -f "$AK_BINDIR/ak-$subcmd" ] @@ -139,6 +179,7 @@ else fi counter=$(($counter + 1)) done + _ak_usage find $AK_BINDIR | while read available do echo $(basename $available) |\ diff --git a/bin/ak-cjdns b/bin/ak-cjdns index 3abc254..1b2e4c0 100755 --- a/bin/ak-cjdns +++ b/bin/ak-cjdns @@ -1,4 +1,22 @@ -#!/bin/bash +#!/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/>. +### ## ## cjdns helper ## @@ -15,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 ] diff --git a/bin/ak-clean b/bin/ak-clean index 8d28d74..b77e74b 100755 --- a/bin/ak-clean +++ b/bin/ak-clean @@ -1,4 +1,22 @@ -#!/bin/bash +#!/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/>. +### ## ## Cleans up temporary directories and files ## @@ -17,9 +35,10 @@ 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 -_ak_tmp_cleanup(){ +function _ak_tmp_cleanup(){ ls -1 /tmp/aktmp* > /dev/null 2>&1 if [ $? -ne 0 ] then diff --git a/bin/ak-coin b/bin/ak-coin index 96f9f88..c7478ab 100755 --- a/bin/ak-coin +++ b/bin/ak-coin @@ -1,4 +1,22 @@ -#!/bin/bash +#!/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/>. +### ## ## Coin status ## @@ -12,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 ] diff --git a/bin/ak-config b/bin/ak-config index 4418ba3..770255b 100755 --- a/bin/ak-config +++ b/bin/ak-config @@ -1,4 +1,22 @@ -#!/bin/bash +#!/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/>. +### ## ## Usage: ak-config [ -h | --help | --show | --publish | --get-published ] ## @@ -12,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 @@ -1,4 +1,22 @@ -#!/bin/bash +#!/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/>. +### ## ## Tools to add, get and cat files to/from the Arching Kaos File System ## @@ -6,26 +24,39 @@ ## ## -h, --help Prints this help message ## --add, --import <file> Adds/Imports a file to the AKFS system -## --get, --export <hash> <output file> Exports a file from the AKFS system -## --cat <hash> Concatenates from given hash +## --get, --export <roothash> <output file> Exports a file from the AKFS system +## --cat <roothash> Concatenates from given hash ## --list Lists names and roots available +## --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 +## --gfm <maphash> Get file from map ## 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 case $1 in -h | --help) _ak_usage; exit;; --add|--import) _ak_fs_import $2; exit;; - --get|--export) _ak_fs_export $2 $3; exit;; + --get|--export) shift; _ak_fs_export $1 $2; exit;; --cat) _ak_fs_cat $2; exit;; + --net-cat) _ak_fs_net_cat $2; exit;; + --net-get) _ak_fs_net_get $2; exit;; + --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;; + --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;; esac else diff --git a/bin/ak-get-balances b/bin/ak-get-balances index 5fe56ea..f5f57ca 100755 --- a/bin/ak-get-balances +++ b/bin/ak-get-balances @@ -1,4 +1,22 @@ -#!/bin/bash +#!/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/>. +### ## ## Calculates the balances of the sblocks found from a chain ## Saves stuff too for later reference @@ -10,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" @@ -55,7 +74,7 @@ fi TEMP="$(_ak_make_temp_directory)" cd $TEMP -_ak_get_zblocks_from_sblock(){ +function _ak_get_zblocks_from_sblock(){ if [ "$(_ak_sblock_show $1 | jq 'has("zblocks")')" == "true" ] then mkdir $1 && cd $1 @@ -67,7 +86,7 @@ _ak_get_zblocks_from_sblock(){ fi } -_ak_verify_zblocks_found(){ +function _ak_verify_zblocks_found(){ if [ -d $1 ] then cd $1 @@ -101,7 +120,7 @@ _ak_verify_zblocks_found(){ fi } -_ak_balances_from_sblock(){ +function _ak_balances_from_sblock(){ if [ -z $1 ] || [ ! -n "$1" ] then _ak_log_error "No sblock provided $1" @@ -137,7 +156,7 @@ _ak_balances_from_sblock(){ fi } -_ak_rewards_from_sblock(){ +function _ak_rewards_from_sblock(){ if [ ! -z $1 ] && [ -n "$1" ] then CUR_TARGET="$1" @@ -173,7 +192,7 @@ _ak_rewards_from_sblock(){ fi } -_ak_sblock_get_previous(){ +function _ak_sblock_get_previous(){ if [ -z $1 ] || [ ! -n "$1" ] then _ak_log_error "No sblock provided !!" @@ -189,7 +208,7 @@ _ak_sblock_get_previous(){ echo -n $PREVIOUS } -_ak_balances_calculate(){ +function _ak_balances_calculate(){ if [ ! -z $1 ] && [ -n "$1" ] then _ak_log_info "Calculating balance for $1" @@ -219,7 +238,7 @@ _ak_balances_calculate(){ fi } -_ak_balances_print(){ +function _ak_balances_print(){ if [ ! -z $1 ] && [ -n "$1" ] then CUR_TARGET="$1" @@ -237,7 +256,7 @@ _ak_balances_print(){ fi } -_ak_schain_counting_balances(){ +function _ak_schain_counting_balances(){ if [ ! -z $1 ] && [ -n "$1" ] then CUR_TARGET="$1" @@ -1,4 +1,22 @@ -#!/bin/bash +#!/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/>. +### ## ## It is a minimal wrapper aroung lib/_ak_gpg. ## @@ -26,15 +44,17 @@ ## -d, --delete-key Delete GPG keys from your keyring ## -ds, --delete-secret-key <fingerprint> ## Delete GPG keys from your keyring +## -r, --run Runs a command with gpg2 ## fullprogrampath="$(realpath $0)" 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 @@ -45,7 +65,7 @@ if [ ! -z $1 ]; then --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) _ak_gpg_key_get_fingerprint_from_ipfs $1; 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;; --clear-sign) shift; _ak_gpg_sign_clear "$2" "$1"; exit;; --verify-file) shift; _ak_gpg_verify_clear_signature "$1"; exit;; @@ -59,6 +79,7 @@ if [ ! -z $1 ]; then --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;; esac else _ak_usage diff --git a/bin/ak-ipfs b/bin/ak-ipfs new file mode 100755 index 0000000..f3ef6da --- /dev/null +++ b/bin/ak-ipfs @@ -0,0 +1,48 @@ +#!/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/>. +### +## +## Starts IPFS daemon +## +## Usage: +## +## -h, --help Prints this help message +## -d, --daemon Starts IPFS daemon for AK +## -r, --run Runs an IPFS command for AK +## +fullprogrampath="$(realpath $0)" +PROGRAM=$(basename $0) +descriptionString="IPFS handler" + +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 ] +then + case $1 in + -h | --help) _ak_usage; exit;; + -d | --daemon) _ak_ipfs_starter; exit;; + -r | --run) shift; _ak_ipfs_runner $*; exit;; + * ) _ak_usage;; + esac +else _ak_usage +fi diff --git a/bin/ak-ipfs-daemon b/bin/ak-ipfs-daemon deleted file mode 100755 index 6ae4aa3..0000000 --- a/bin/ak-ipfs-daemon +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -## -## Starts IPFS daemon -## -## Usage: -## -## -h, --help Prints this help message -## -d, --daemon Starts IPFS daemon for AK -## -fullprogrampath="$(realpath $0)" -PROGRAM=$(basename $0) -descriptionString="IPFS handler" - -source $AK_LIBDIR/_ak_log -source $AK_LIBDIR/_ak_script -source $AK_LIBDIR/_ak_ipfs - -# Flags to run -if [ ! -z $1 ] -then - case $1 in - -h | --help) _ak_usage; exit;; - -d | --daemon) _ak_ipfs_starter; exit;; - * ) _ak_usage;; - esac -else _ak_usage -fi diff --git a/bin/ak-ipfs-starter b/bin/ak-ipfs-starter index 3a7df29..df2791c 100755 --- a/bin/ak-ipfs-starter +++ b/bin/ak-ipfs-starter @@ -1,8 +1,27 @@ -#!/bin/bash +#!/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/>. +### 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 ] diff --git a/bin/ak-irc b/bin/ak-irc new file mode 100755 index 0000000..b2351ce --- /dev/null +++ b/bin/ak-irc @@ -0,0 +1,52 @@ +#!/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/>. +### +## +## Brief description +## +## Usage: +## +## -h, --help Prints this help message +## +fullprogrampath="$(realpath $0)" +PROGRAM=$(basename $0) +descriptionString="IRC" + +# At least these +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(){ + echo "Example" +} + +# Flags to run +if [ ! -z $1 ] +then + case $1 in + -h | --help) _ak_usage; exit;; + --example) example; exit;; + --connect) _ak_irc_connect; exit;; + * ) _ak_usage;; + esac +else _ak_usage +fi diff --git a/bin/ak-json2bash b/bin/ak-json2bash index 70b0d3b..235d698 100755 --- a/bin/ak-json2bash +++ b/bin/ak-json2bash @@ -1,4 +1,22 @@ -#!/bin/bash +#!/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/>. +### # # ak-json2bash # @@ -1,4 +1,22 @@ -#!/bin/bash +#!/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/>. +### ## ## Used to overview, archive or append to the log file ## @@ -17,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(){ @@ -30,6 +49,7 @@ if [ ! -z $1 ]; then c |