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-folders | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'bin/ak-folders') diff --git a/bin/ak-folders b/bin/ak-folders index 2651571..5aa82c7 100755 --- a/bin/ak-folders +++ b/bin/ak-folders @@ -1,11 +1,22 @@ #!/bin/bash -# The following creates a mixtape data message +## The following creates a folder data message +## +## +## -h, --help Prints this help message +## +## +## add Try ak-folders add +## +fullprogrampath="$(realpath $0)" PROGRAM="$(basename $0)" +descriptionString="Module for adding folders" ZFOLDERSDIR="$AK_WORKDIR/folders" TEMP="/tmp/aktmp" -source $AK_LIBDIR/_ak_logit +source $AK_LIBDIR/_ak_log +source $AK_LIBDIR/_ak_script source $AK_LIBDIR/_ak_ipfs +source $AK_LIBDIR/_ak_zblock if [ ! -d $ZFOLDERSDIR ]; then mkdir $ZFOLDERSDIR @@ -17,12 +28,6 @@ fi TEMPASSIN="$(ak-tempassin)" cd $TEMPASSIN -_ak_modules_folders_usage(){ - _ak_modules_folders_title - echo "" - echo " -h, --help Show this message" - echo " add Try ak-folders add " -} _ak_modules_folders_add(){ CRP="$(pwd)" @@ -60,7 +65,7 @@ _ak_modules_folders_main(){ cat data echo "Publishing..." - ak-zblock-pack folders/add $(pwd)/data + _ak_zblock_pack folders/add $(pwd)/data if [ $? == 0 ] then echo "cool" @@ -76,9 +81,9 @@ _ak_modules_folders_title(){ if [ ! -z $1 ]; then case $1 in - -h | --help) _ak_modules_folders_usage; exit;; + -h | --help) _ak_usage; exit;; add) _ak_modules_folders_add $2; exit;; - *) _ak_modules_folders_usage; exit;; + *) _ak_usage; exit;; esac -else _ak_modules_folders_usage +else _ak_usage fi -- cgit v1.2.3