aboutsummaryrefslogtreecommitdiff
path: root/bin/ak-folders
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-folders
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-folders')
-rwxr-xr-xbin/ak-folders29
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