diff options
Diffstat (limited to 'bin/ak-folders')
-rwxr-xr-x | bin/ak-folders | 29 |
1 files changed, 17 insertions, 12 deletions
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 <folder> Try ak-folders add <folder> +## +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 <folder> Try ak-folders add <folder>" -} _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 |