#!/bin/bash AUTH=xuu:zero-punish-whenever-swell SSH_KEY=~/.ssh/id_ed25519 MERCURY_URL=localhost:4088/v1/mercury/config SIGFILE=$(mktemp) http --auth "$AUTH" \ GET "$MERCURY_URL" \ space=="$1" |\ sed '/^----/,$d' |\ tee "$SIGFILE" | tee test | \ ssh-keygen -Y sign \ -f "$SSH_KEY" \ -n file >> "$SIGFILE" http -f \ --auth "$AUTH" \ POST "$MERCURY_URL" \ "content@$SIGFILE" rm "$SIGFILE"