diff options
Diffstat (limited to 'bin/ak-files')
-rwxr-xr-x | bin/ak-files | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/bin/ak-files b/bin/ak-files index 7755c58..14657a4 100755 --- a/bin/ak-files +++ b/bin/ak-files @@ -68,10 +68,21 @@ main(){ logthis "error" fi logthis "Signing..." - SIGN_FILE=$FILE".asc" - gpg2 --detach-sign --sign-with $FINGERPRINT --armor --output $SIGN_FILE $FILE + SIGN_FILE=$FILENAME".asc" + gpg2 --detach-sign --sign-with $FINGERPRINT --armor --output $TEMPASSIN/$SIGN_FILE $TEMPASSIN/$FILE + if [ $? == 0 ]; then + logthis "Signed" + else + logthis "Error while signing" + fi - SIGNATURE=$(ipfs add -q $SIGN_FILE) + logthis "Adding signature to IPFS" + SIGNATURE=$(ipfs add -q $TEMPASSIN/$SIGN_FILE) + if [ $? == 0 ]; then + logthis "Added" + else + logthis "Error while adding" + fi cat > $TEMPASSIN/data <<EOF { |