diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2024-02-27 02:14:19 +0200 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2024-02-27 02:14:19 +0200 |
commit | 94c6cd43413f266f0db898cfb3fc7a9833509ef8 (patch) | |
tree | 087f6f40d2e151ceed41dd03933317f35a014dfe /bin/ak-comments | |
parent | f93ebfadb3e0d89e668784cd781ad33c62e01065 (diff) | |
download | arching-kaos-tools-94c6cd43413f266f0db898cfb3fc7a9833509ef8.tar.gz arching-kaos-tools-94c6cd43413f266f0db898cfb3fc7a9833509ef8.tar.bz2 arching-kaos-tools-94c6cd43413f266f0db898cfb3fc7a9833509ef8.zip |
Refactored function names
Diffstat (limited to 'bin/ak-comments')
-rwxr-xr-x | bin/ak-comments | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/bin/ak-comments b/bin/ak-comments index a8016bf..34b83c0 100755 --- a/bin/ak-comments +++ b/bin/ak-comments @@ -9,7 +9,7 @@ else ak-logthis "[INFO]" "zcommentsdir found" fi -create(){ +_ak_modules_comments_create(){ if [ ! -z $1 ] then REFER_TO="$1" @@ -26,7 +26,7 @@ create(){ TO_FILE=$COMMENTS_FILE IPFS_FILE=$(ak-ipfs-add $COMMENTS_FILE) mv $COMMENTS_FILE $ZCOMMENTSDIR/$TO_FILE - add $TO_FILE + _ak_modules_comments_add $TO_FILE ak-logthis "[INFO]" "Adding to git repo..." cd $ZCOMMENTSDIR if [ ! -z $REFER_TO ] @@ -35,7 +35,7 @@ create(){ fi } -index(){ +_ak_modules_comments_index(){ FILES="$(ls -1 $ZCOMMENTSDIR)" i=0 for FILE in $FILES @@ -46,10 +46,10 @@ index(){ let i+=1 done } -title(){ +_ak_modules_comments_title(){ echo comments } -add(){ +_ak_modules_comments_add(){ TEMP="$(ak-tempassin)" cd $TEMP if [ -f "$ZCOMMENTSDIR/$1" ]; then @@ -74,8 +74,8 @@ add(){ exit 1 fi } -usage(){ - title +_ak_modules_comments_usage(){ + _ak_modules_comments_title echo "All you need to know is that there are two options available:" echo "" echo "help Prints this help message" @@ -88,11 +88,11 @@ usage(){ if [ ! -z $1 ]; then case $1 in - help) usage; exit;; - index) index; exit;; - add) add $2 $3; exit;; - create) create $2; exit;; - * ) usage;; + help) _ak_modules_comments_usage; exit;; + index) _ak_modules_comments_index; exit;; + add) _ak_modules_comments_add $2 $3; exit;; + create) _ak_modules_comments_create $2; exit;; + * ) _ak_modules_comments_usage;; esac -else usage +else _ak_modules_comments_usage fi |