diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2024-03-31 12:00:59 +0300 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2024-03-31 12:00:59 +0300 |
commit | e4f18be94261b39544ef3bc50321f6aedeb45bd6 (patch) | |
tree | 2c79daf0bdc91beb91846f00bb3d3f51236967cf /bin/ak-files | |
parent | 23a61661f03c03a357ad8aa47ba3595fabe24de1 (diff) | |
download | arching-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-files')
-rwxr-xr-x | bin/ak-files | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/bin/ak-files b/bin/ak-files index 7cdedcd..73c8219 100755 --- a/bin/ak-files +++ b/bin/ak-files @@ -1,11 +1,19 @@ #!/bin/bash -# The following creates a mixtape data message +## +## The following creates a files data message +## +## -h, --help Prints this help message +## +fullprogrampath="$(realpath $0)" +PROGRAM=$(basename $0) +descriptionString="Module for adding files" ZFILESDIR="$AK_WORKDIR/files" TEMP="/tmp/aktmp" -PROGRAM="$(basename $0)" -source $AK_LIBDIR/_ak_logit +source $AK_LIBDIR/_ak_script +source $AK_LIBDIR/_ak_log source $AK_LIBDIR/_ak_ipfs source $AK_LIBDIR/_ak_gpg +source $AK_LIBDIR/_ak_zblock if [ ! -d $ZFILESDIR ]; then mkdir $ZFILESDIR @@ -22,10 +30,6 @@ else logit "INFO" "$ZFILESDIR found!" fi -_ak_modules_files_usage(){ - echo "$PROGRAM - file" -} - _ak_modules_files_add(){ CRP="$(pwd)" FILENAME="$1" @@ -92,7 +96,7 @@ echo "Printing data..." cat $TEMPASSIN/data echo "Publishing..." - ak-zblock-pack files/add $PWD/data + _ak_zblock_pack files/add $PWD/data if [ $? == 0 ] then echo "cool" @@ -104,9 +108,9 @@ echo "Publishing..." if [ ! -z $1 ]; then case $1 in - -h | --help) _ak_modules_files_usage; exit;; + -h | --help) _ak_usage; exit;; add) _ak_modules_files_add $2; exit;; - *) _ak_modules_files_usage; exit;; + *) _ak_usage; exit;; esac -else _ak_modules_files_usage +else _ak_usage fi |