From e4f18be94261b39544ef3bc50321f6aedeb45bd6 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Sun, 31 Mar 2024 12:00:59 +0300 Subject: huge refactor, might breaking things --- bin/ak-config | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) (limited to 'bin/ak-config') diff --git a/bin/ak-config b/bin/ak-config index 1fe4d8d..cc2c8c5 100755 --- a/bin/ak-config +++ b/bin/ak-config @@ -1,27 +1,22 @@ #!/bin/bash +## +## Usage: ak-config [ -h | --help | show | publish | get-published ] +## +## -h, --help Show this help screen +## +## show Show current configuration (from FileSystem) +## +## publish Publish current configuration +## +## get-published Get published ak-config (from IPFS) +## +fullprogrampath="$(realpath $0)" PROGRAM="$(basename $0)" descriptionString="Arching Kaos Configuration Tool" -source $AK_LIBDIR/_ak_script_description +source $AK_LIBDIR/_ak_script source $AK_LIBDIR/_ak_ipfs -_ak_config_title(){ - description -} - -_ak_config_usage(){ - _ak_config_title - echo "" - echo "Usage: $PROGRAM [ -h | --help | show | publish | get-published ]" - echo "" - echo " -h, --help Show this help screen" - echo " show Show current configuration (from FileSystem)" - echo " publish Publish current configuration" - echo " get-published Get published ak-config (from IPFS)" - echo "" - exit 0 -} - _ak_config_show(){ # We will be using our public key also to put it in the block later KEY="tmp-gpg.pub" @@ -62,12 +57,12 @@ _ak_config_published(){ if [ ! -z $1 ]; then case $1 in - --help| -h) _ak_config_usage;exit;; + --help| -h) _ak_usage;exit;; show) _ak_config_show;exit;; publish) _ak_config_publish;exit;; get-published) _ak_config_published;exit;; - *) _ak_config_usage;exit;; + *) _ak_usage;exit;; esac else - _ak_config_usage + _ak_usage fi -- cgit v1.2.3