From fc91066907e4d16a951c8d72d23aa610945f5407 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Mon, 3 Apr 2023 05:15:00 +0300 Subject: Clean up, elimination of duplicate tempassins, fixed current directory problems, introduced new tool --- bin/ak-comments | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'bin/ak-comments') diff --git a/bin/ak-comments b/bin/ak-comments index 7feb889..cd86a08 100755 --- a/bin/ak-comments +++ b/bin/ak-comments @@ -4,8 +4,7 @@ TEMP="/tmp/aktmp" if [ ! -d $ZCOMMENTSDIR ]; then mkdir $ZCOMMENTSDIR cd $ZCOMMENTSDIR - git init - ak-logthis "[INFO]" "zcommentsdir created along with git repo" + ak-logthis "[INFO]" "zcommentsdir created" else ak-logthis "[INFO]" "zcommentsdir found" fi @@ -30,15 +29,12 @@ create(){ add $TO_FILE ak-logthis "[INFO]" "Adding to git repo..." cd $ZCOMMENTSDIR - git add $TO_FILE - git commit -m "Added $TO_FILE with $(head -n 1 $ZCOMMENTSDIR/$TO_FILE)" - git clean --force - # rm -rf $TEMP if [ ! -z $REFER_TO ] then reference create $REFERENCE $REFER_TO fi } + index(){ FILES="$(ls -1 $ZCOMMENTSDIR)" i=0 @@ -64,18 +60,12 @@ add(){ FILE_SIGN_FILE=$FILE".asc" gpg --detach-sign --sign-with $FINGERPRINT --armor --output $FILE_SIGN_FILE $FILE FILE_SIGNATURE=$(ak-ipfs-add $FILE_SIGN_FILE) - cat > data < data else echo "File $FILE doesn't exist"; exit 2 fi - REFERENCE="$(ak-pack_z_block "comments/add" data)" + REFERENCE="$(ak-pack_z_block "comments/add" $(pwd)/data)" if [ $? == 0 ] then echo "Comment added successfully" -- cgit v1.2.3