#!/usr/bin/env sh
# SPDX-License-Identifier: MIT
# ──────────────────────────────────────────────────────────────────────────────
# $source: cappysan-dotfile-scripts$
# ──────────────────────────────────────────────────────────────────────────────
#
# NAME
#      to-tmpfile - write the stdin in a tmpfile, output the tmpfile name
#
# SEE ALSO
#      mktemp(1)
#
tmpfile=$(mktemp -t tmp.stdin.XXXXXXXXXX)
cat /dev/stdin > ${tmpfile}
echo ${tmpfile}
