aboutsummaryrefslogtreecommitdiff
path: root/bin/mkdtemp
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-05-09 09:16:29 -0300
committerEuAndreh <eu@euandre.org>2024-05-09 09:16:29 -0300
commitcb3e6e922465717e360cedbe80f2420cc50e397d (patch)
treea0e2abd36b11acef9bf6e230a3f69843a0a59595 /bin/mkdtemp
parentbin/backup: Further simplify this backup script (diff)
downloaddotfiles-cb3e6e922465717e360cedbe80f2420cc50e397d.tar.gz
dotfiles-cb3e6e922465717e360cedbe80f2420cc50e397d.tar.xz
bin/...: Move utilities to the dedicated "eut" package
Diffstat (limited to 'bin/mkdtemp')
-rwxr-xr-xbin/mkdtemp65
1 files changed, 0 insertions, 65 deletions
diff --git a/bin/mkdtemp b/bin/mkdtemp
deleted file mode 100755
index 3c920a8..0000000
--- a/bin/mkdtemp
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/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.
-
-
- Examples:
-
- `cd` into temporary directory:
-
- $ cd "$(mkdtemp)"
- 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)"
-mkdir "$name"
-printf '%s\n' "$name"