aboutsummaryrefslogtreecommitdiff
path: root/lib/_ak_zblock
diff options
context:
space:
mode:
Diffstat (limited to 'lib/_ak_zblock')
-rwxr-xr-xlib/_ak_zblock10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/_ak_zblock b/lib/_ak_zblock
index 6afacfc..48aa7b5 100755
--- a/lib/_ak_zblock
+++ b/lib/_ak_zblock
@@ -3,19 +3,16 @@ source $AK_LIBDIR/_ak_log
source $AK_LIBDIR/_ak_script
source $AK_LIBDIR/_ak_gpg
source $AK_LIBDIR/_ak_html
+source $AK_LIBDIR/_ak_ipfs
-_ak_zblock_show(){
# _ak_zblock_show
# ak-zblock [IPFS CID]
#
# Returns a JSON array representing the chain retrieved.
# Logs messages to $LOGSFILE.
+_ak_zblock_show(){
verify=1
- if [ ! -z "$1" ] && [ "$1" == "-h" ] || [ "$1" == "--help" ]
- then
- usage
- exit
- elif [ ! -z "$1" ]
+ if [ ! -z $1 ] && [ -n "$1" ]
then
echo $1 | grep -e 'Qm.\{44\}' >/dev/null
if [ $? -ne 0 ]
@@ -28,7 +25,6 @@ _ak_zblock_show(){
entrance="$(cat $AK_ZLATEST)"
fi
zblock=$entrance
- # ak-enter -l 1 "$entrance" > "$AK_CACHEDIR/fzblocks/$entrance"
# Check if $zblock exists as variable
if [ ! -v $zblock ]
then