aboutsummaryrefslogtreecommitdiff
path: root/bin/mkdtemp
blob: d012175111f4520204cb03bbac95f902403b1367 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
set -eu

usage() {
	cat <<-'EOF'
		Usage:
		  mkdtemp
		  mkdtemp -h
	EOF
}

help() {
	cat <<-'EOF'

		Options:
		  -h, --help    show this message

		Create a new temporary file and echo its name back.
	EOF
}

name="$(tmpname)"
mkdir "$name"
echo "$name"