aboutsummaryrefslogtreecommitdiff
path: root/bin/mkstemp
diff options
context:
space:
mode:
Diffstat (limited to 'bin/mkstemp')
-rwxr-xr-xbin/mkstemp65
1 files changed, 0 insertions, 65 deletions
diff --git a/bin/mkstemp b/bin/mkstemp
deleted file mode 100755
index ec0d744..0000000
--- a/bin/mkstemp
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/bin/sh
-set -eu
-
-usage() {
- cat <<-'EOF'
- Usage:
- mkstemp
- mkstemp -h
- EOF
-}
-
-help() {
- cat <<-'EOF'
-
-
- Options:
- -h, --help show this message
-
-
- Create a new temporary file and echo its name back.
-
-
- Examples:
-
- Capture output into temporary file:
-
- $ OUT="$(mkstemp)"; cmd > "$OUT"
- EOF
-}
-
-
-for flag in "$@"; do
- case "$flag" in
- (--)
- break
- ;;
- (--help)
- usage
- help
- exit
- ;;
- (*)
- ;;
- esac
-done
-
-while getopts 'h' flag; do
- case "$flag" in
- (h)
- usage
- help
- exit
- ;;
- (*)
- usage >&2
- exit 2
- ;;
- esac
-done
-shift $((OPTIND - 1))
-
-
-name="$(tmpname)"
-touch "$name"
-printf '%s\n' "$name"