diff options
author | kaotisk <kaotisk@arching-kaos.com> | 2022-02-11 09:29:51 +0200 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.com> | 2022-02-11 09:29:51 +0200 |
commit | d643dfcd3548fc9c0fbb01bee3a88984000ecea6 (patch) | |
tree | bbbcf97047ff8989b4a1a1c01460ba899f45c373 /bin | |
parent | f3cbbde027900643d5ec56af6746be0dab9dfb9e (diff) | |
download | arching-kaos-tools-d643dfcd3548fc9c0fbb01bee3a88984000ecea6.tar.gz arching-kaos-tools-d643dfcd3548fc9c0fbb01bee3a88984000ecea6.tar.bz2 arching-kaos-tools-d643dfcd3548fc9c0fbb01bee3a88984000ecea6.zip |
Added some debug messages
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ak-files | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/bin/ak-files b/bin/ak-files index c307640..7755c58 100755 --- a/bin/ak-files +++ b/bin/ak-files @@ -41,12 +41,33 @@ main(){ FILENAME="$1" CRP="$2" echo "Adding $FILENAME" + logthis "Switching to tmp folder..." TEMPASSIN="$(tempassin)" cd $TEMPASSIN + if [ $? == 0 ]; then + logthis "Success" + else + logthis "Error with tmp folder" + exit 5 + fi + logthis "Copying $1 to $TEMPASSIN" cp $2/$1 $TEMPASSIN/$1 + if [ $? == 0 ]; then + logthis "Copied successfully" + else + logthis "Error copying..." + fi + FILE="$TEMPASSIN/$1" - FILE_IPFS_HASH=$(ipfs add -q $FILE) + logthis "Adding $FILE to IPFS..." + FILE_IPFS_HASH=$(ipfs add -q $FILE) + if [ $? == 0 ]; then + logthis "done" + else + logthis "error" + fi + logthis "Signing..." SIGN_FILE=$FILE".asc" gpg2 --detach-sign --sign-with $FINGERPRINT --armor --output $SIGN_FILE $FILE |