#! /bin/sh TMPDIR="$(mktemp -d /tmp/gpg-refresh-cache.XXXXXX)" trap 'rm -rf "$TMPDIR"' EXIT touch "$TMPDIR/foo" gpg --clearsign "$TMPDIR/foo"