#!/bin/bash # custodisco posting #GIVE and MINT options ## ok we need to be passed a number of arguments ## item description/GIVE to account ID = $2 ## image path/messageID of existing item = $3 if [ -z "$1" ] then echo "need arguments pls" fi ## mint if [ "$1" == "mint" ] then itemDescription=$2 itemImagePath=$3 # remove meta-data from the image and compress a bit jpegoptim --strip-all --overwrite "$itemImagePath" --size=200k > /dev/null 2>&1 #add blob blobID=$(cat $itemImagePath | ssb-server blobs.add) || exit 1 # publish the item ssb-server publish . <