aboutsummaryrefslogtreecommitdiff
path: root/bin/ak-config
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2024-03-31 12:00:59 +0300
committerkaotisk <kaotisk@arching-kaos.org>2024-03-31 12:00:59 +0300
commite4f18be94261b39544ef3bc50321f6aedeb45bd6 (patch)
tree2c79daf0bdc91beb91846f00bb3d3f51236967cf /bin/ak-config
parent23a61661f03c03a357ad8aa47ba3595fabe24de1 (diff)
downloadarching-kaos-tools-e4f18be94261b39544ef3bc50321f6aedeb45bd6.tar.gz
arching-kaos-tools-e4f18be94261b39544ef3bc50321f6aedeb45bd6.tar.bz2
arching-kaos-tools-e4f18be94261b39544ef3bc50321f6aedeb45bd6.zip
huge refactor, might breaking things
Diffstat (limited to 'bin/ak-config')
-rwxr-xr-xbin/ak-config37
1 files changed, 16 insertions, 21 deletions
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