diff options
Diffstat (limited to 'bin/ak-ipfs-add')
-rwxr-xr-x | bin/ak-ipfs-add | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/ak-ipfs-add b/bin/ak-ipfs-add index c3f75f1..63862b7 100755 --- a/bin/ak-ipfs-add +++ b/bin/ak-ipfs-add @@ -1,3 +1,10 @@ #!/bin/bash +PROGRAM="$(basename $0)" +# Receives a file +# Returns a hash ipfs add -Qr "$1" - +if [ "$?" != "0" ] +then + ak-logthis "<$PROGRAM>" "[ERROR]" "Failed to add $1" + exit 1 +fi |