diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2023-03-29 23:46:45 +0300 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2023-03-29 23:46:45 +0300 |
commit | 7e45b9def509ff28f70c28f50f5aa931f512d81b (patch) | |
tree | cba30ff5eb679f1c6426dedb5383bd401f8f8cfb /bin/ak-folders | |
parent | 286b71a6ead8c7234cfbc0b8ece05c8239a4f32c (diff) | |
download | arching-kaos-tools-7e45b9def509ff28f70c28f50f5aa931f512d81b.tar.gz arching-kaos-tools-7e45b9def509ff28f70c28f50f5aa931f512d81b.tar.bz2 arching-kaos-tools-7e45b9def509ff28f70c28f50f5aa931f512d81b.zip |
Further renaming
Diffstat (limited to 'bin/ak-folders')
-rwxr-xr-x | bin/ak-folders | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/bin/ak-folders b/bin/ak-folders index a1c8df4..108e7ff 100755 --- a/bin/ak-folders +++ b/bin/ak-folders @@ -1,14 +1,14 @@ #!/bin/bash # The following creates a mixtape data message # We can extend it by calling the pack_z_block.sh mixtape/add data -ZFOLDERSDIR="$WORKDIR/folders" +ZFOLDERSDIR="$AK_WORKDIR/folders" TEMP="/tmp/aktmp" if [ ! -d $ZFOLDERSDIR ]; then mkdir $ZFOLDERSDIR cd $ZFOLDERSDIR git init else - logthis "error $ZFOLDERSDIR not found" + ak-logthis "error $ZFOLDERSDIR not found" fi tempassin(){ if [ ! -z $1 ]; @@ -41,49 +41,49 @@ main(){ FOLDERNAME="$1" CRP="$2" echo "Adding $FOLDERNAME" - logthis "Switching to tmp folder..." + ak-logthis "Switching to tmp folder..." TEMPASSIN="$(tempassin)" cd $TEMPASSIN if [ $? == 0 ]; then - logthis "Success" + ak-logthis "Success" else - logthis "Error with tmp folder" + ak-logthis "Error with tmp folder" exit 5 fi - logthis "Copying $1 to $TEMPASSIN" + ak-logthis "Copying $1 to $TEMPASSIN" cp -r $2/$1 $TEMPASSIN/$1 if [ $? == 0 ]; then - logthis "Copied successfully" + ak-logthis "Copied successfully" else - logthis "Error copying..." + ak-logthis "Error copying..." fi FOLDER="$TEMPASSIN/$1" - logthis "Adding $FOLDER to IPFS..." + ak-logthis "Adding $FOLDER to IPFS..." FOLDER_IPFS_HASH=$(ipfs add -rQ $FOLDER) if [ $? == 0 ]; then - logthis "done" + ak-logthis "done" else - logthis "error" + ak-logthis "error" fi - logthis "Folders are not signing..." + ak-logthis "Folders are not signing..." # NOT NEEDED HERE # SIGN_FOLDER=$FOLDERNAME".asc" # gpg2 --detach-sign --sign-with $FINGERPRINT --armor --output $SIGN_FOLDER $FOLDER # if [ $? == 0 ]; then -# logthis "Signed" +# ak-logthis "Signed" # else -# logthis "Error while signing" +# ak-logthis "Error while signing" # fi # -# logthis "Adding signature to IPFS" +# ak-logthis "Adding signature to IPFS" # SIGNATURE=$(ipfs add -q $TEMPASSIN/$SIGN_FOLDER) # if [ $? == 0 ]; then -# logthis "Added" +# ak-logthis "Added" # else -# logthis "Error while adding" +# ak-logthis "Error while adding" # fi cat > $TEMPASSIN/data <<EOF |