aboutsummaryrefslogtreecommitdiff
path: root/bin/mkdtemp
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2022-05-12 12:01:54 -0300
committerEuAndreh <eu@euandre.org>2022-05-12 12:01:54 -0300
commit90eaebabcaaea74237f34cf05709625345f276cc (patch)
tree349e7609d20ecfb6567652a7e28595cec9647eb0 /bin/mkdtemp
parent.usr/etc/i3/config: WIP setup extra bindings (diff)
downloaddotfiles-90eaebabcaaea74237f34cf05709625345f276cc.tar.gz
dotfiles-90eaebabcaaea74237f34cf05709625345f276cc.tar.xz
Move Git repository into ~/.usr/.git/
Diffstat (limited to 'bin/mkdtemp')
-rwxr-xr-xbin/mkdtemp24
1 files changed, 24 insertions, 0 deletions
diff --git a/bin/mkdtemp b/bin/mkdtemp
new file mode 100755
index 0000000..9c7ddd8
--- /dev/null
+++ b/bin/mkdtemp
@@ -0,0 +1,24 @@
+#!/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.
+ EOF
+}
+
+name="$(tmpname)"
+mkdir "$name"
+echo "$name"